//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================

#if _MSC_VER > 1000
#pragma once
#endif

#ifndef __objidl_h__
#define __objidl_h__

#ifdef __cplusplus
extern "C"{
#endif

/* Forward Declarations */

#ifndef __IMarshal_FWD_DEFINED__
#define __IMarshal_FWD_DEFINED__
typedef interface IMarshal IMarshal;
#endif     /* __IMarshal_FWD_DEFINED__ */

#ifndef __IExternalConnection_FWD_DEFINED__
#define __IExternalConnection_FWD_DEFINED__
typedef interface IExternalConnection IExternalConnection;
#endif     /* __IExternalConnection_FWD_DEFINED__ */

#ifndef __IEnumUnknown_FWD_DEFINED__
#define __IEnumUnknown_FWD_DEFINED__
typedef interface IEnumUnknown IEnumUnknown;
#endif     /* __IEnumUnknown_FWD_DEFINED__ */

#ifndef __IBindCtx_FWD_DEFINED__
#define __IBindCtx_FWD_DEFINED__
typedef interface IBindCtx IBindCtx;
#endif     /* __IBindCtx_FWD_DEFINED__ */

#ifndef __IEnumMoniker_FWD_DEFINED__
#define __IEnumMoniker_FWD_DEFINED__
typedef interface IEnumMoniker IEnumMoniker;
#endif     /* __IEnumMoniker_FWD_DEFINED__ */

#ifndef __IRunnableObject_FWD_DEFINED__
#define __IRunnableObject_FWD_DEFINED__
typedef interface IRunnableObject IRunnableObject;
#endif     /* __IRunnableObject_FWD_DEFINED__ */

#ifndef __IRunningObjectTable_FWD_DEFINED__
#define __IRunningObjectTable_FWD_DEFINED__
typedef interface IRunningObjectTable IRunningObjectTable;
#endif     /* __IRunningObjectTable_FWD_DEFINED__ */

#ifndef __IPersist_FWD_DEFINED__
#define __IPersist_FWD_DEFINED__
typedef interface IPersist IPersist;
#endif     /* __IPersist_FWD_DEFINED__ */

#ifndef __IPersistStream_FWD_DEFINED__
#define __IPersistStream_FWD_DEFINED__
typedef interface IPersistStream IPersistStream;
#endif     /* __IPersistStream_FWD_DEFINED__ */

#ifndef __IMoniker_FWD_DEFINED__
#define __IMoniker_FWD_DEFINED__
typedef interface IMoniker IMoniker;
#endif     /* __IMoniker_FWD_DEFINED__ */

#ifndef __IEnumString_FWD_DEFINED__
#define __IEnumString_FWD_DEFINED__
typedef interface IEnumString IEnumString;
#endif     /* __IEnumString_FWD_DEFINED__ */

#ifndef __IEnumSTATSTG_FWD_DEFINED__
#define __IEnumSTATSTG_FWD_DEFINED__
typedef interface IEnumSTATSTG IEnumSTATSTG;
#endif     /* __IEnumSTATSTG_FWD_DEFINED__ */

#ifndef __IStorage_FWD_DEFINED__
#define __IStorage_FWD_DEFINED__
typedef interface IStorage IStorage;
#endif     /* __IStorage_FWD_DEFINED__ */

#ifndef __IPersistFile_FWD_DEFINED__
#define __IPersistFile_FWD_DEFINED__
typedef interface IPersistFile IPersistFile;
#endif     /* __IPersistFile_FWD_DEFINED__ */

#ifndef __IPersistStorage_FWD_DEFINED__
#define __IPersistStorage_FWD_DEFINED__
typedef interface IPersistStorage IPersistStorage;
#endif     /* __IPersistStorage_FWD_DEFINED__ */

#ifndef __IEnumFORMATETC_FWD_DEFINED__
#define __IEnumFORMATETC_FWD_DEFINED__
typedef interface IEnumFORMATETC IEnumFORMATETC;
#endif     /* __IEnumFORMATETC_FWD_DEFINED__ */

#ifndef __IEnumSTATDATA_FWD_DEFINED__
#define __IEnumSTATDATA_FWD_DEFINED__
typedef interface IEnumSTATDATA IEnumSTATDATA;
#endif     /* __IEnumSTATDATA_FWD_DEFINED__ */

#ifndef __IRootStorage_FWD_DEFINED__
#define __IRootStorage_FWD_DEFINED__
typedef interface IRootStorage IRootStorage;
#endif     /* __IRootStorage_FWD_DEFINED__ */

#ifndef __IAdviseSink_FWD_DEFINED__
#define __IAdviseSink_FWD_DEFINED__
typedef interface IAdviseSink IAdviseSink;
#endif     /* __IAdviseSink_FWD_DEFINED__ */

#ifndef __IDataObject_FWD_DEFINED__
#define __IDataObject_FWD_DEFINED__
typedef interface IDataObject IDataObject;
#endif     /* __IDataObject_FWD_DEFINED__ */

#ifndef __IDataAdviseHolder_FWD_DEFINED__
#define __IDataAdviseHolder_FWD_DEFINED__
typedef interface IDataAdviseHolder IDataAdviseHolder;
#endif     /* __IDataAdviseHolder_FWD_DEFINED__ */

#ifndef __IAsyncManager_FWD_DEFINED__
#define __IAsyncManager_FWD_DEFINED__
typedef interface IAsyncManager IAsyncManager;
#endif     /* __IAsyncManager_FWD_DEFINED__ */

#ifndef __IRpcChannelBuffer_FWD_DEFINED__
#define __IRpcChannelBuffer_FWD_DEFINED__
typedef interface IRpcChannelBuffer IRpcChannelBuffer;
#endif     /* __IRpcChannelBuffer_FWD_DEFINED__ */

#ifndef __IRpcChannelBuffer2_FWD_DEFINED__
#define __IRpcChannelBuffer2_FWD_DEFINED__
typedef interface IRpcChannelBuffer2 IRpcChannelBuffer2;
#endif     /* __IRpcChannelBuffer2_FWD_DEFINED__ */

#ifndef __IRpcChannelBuffer3_FWD_DEFINED__
#define __IRpcChannelBuffer3_FWD_DEFINED__
typedef interface IRpcChannelBuffer3 IRpcChannelBuffer3;
#endif     /* __IRpcChannelBuffer3_FWD_DEFINED__ */

#ifndef __IRpcProxyBuffer_FWD_DEFINED__
#define __IRpcProxyBuffer_FWD_DEFINED__
typedef interface IRpcProxyBuffer IRpcProxyBuffer;
#endif     /* __IRpcProxyBuffer_FWD_DEFINED__ */

#ifndef __IRpcStubBuffer_FWD_DEFINED__
#define __IRpcStubBuffer_FWD_DEFINED__
typedef interface IRpcStubBuffer IRpcStubBuffer;
#endif     /* __IRpcStubBuffer_FWD_DEFINED__ */

#ifndef __IPSFactoryBuffer_FWD_DEFINED__
#define __IPSFactoryBuffer_FWD_DEFINED__
typedef interface IPSFactoryBuffer IPSFactoryBuffer;
#endif     /* __IPSFactoryBuffer_FWD_DEFINED__ */

/* header files for imported files */
#include "mscom.h"

/* interface __MIDL_itf_objidl_0000 */
/* [local] */

#if ( _MSC_VER >= 1020 )
#pragma once
#endif

typedef struct  tagRECT
    {
    Int32 left;
    Int32 top;
    Int32 right;
    Int32 bottom;
    }    RECT;

typedef struct tagRECT *PRECT;

typedef struct tagRECT *LPRECT;

typedef const RECT *LPCRECT;

typedef const RECT *PCRECT;

typedef struct  tagPOINT
    {
    Int32 x;
    Int32 y;
    }    POINT;

typedef struct tagPOINT *PPOINT;

typedef struct tagPOINT *LPPOINT;

typedef struct  tagPOINTS
    {
    Int16 x;
    Int16 y;
    }    POINTS;

typedef struct tagPOINTS *PPOINTS;

typedef struct tagPOINTS *LPPOINTS;

typedef struct  tagSIZE
    {
    Int32 cx;
    Int32 cy;
    }    SIZE;

typedef struct tagSIZE *PSIZE;

typedef struct tagSIZE *LPSIZE;

typedef UInt32 WPARAM;

typedef Int32 LPARAM;

typedef Int32 LRESULT;

typedef void *HPEN;

typedef void *HRGN;

typedef void *HGDIOBJ;

typedef void *HWND;

typedef void *HBITMAP;

typedef void *HMETAFILEPICT;

typedef void *HENHMETAFILE;

typedef void *HACCEL;

typedef void *HMENU;

typedef void *HBRUSH;

typedef void *HDC;

typedef void *HMETAFILE;

typedef void *HICON;

typedef void *HGLRC;

typedef HICON HCURSOR;

typedef struct  tagPALETTEENTRY
    {
    Byte peRed;
    Byte peGreen;
    Byte peBlue;
    Byte peFlags;
    }    PALETTEENTRY;

typedef struct tagPALETTEENTRY *PPALETTEENTRY;

typedef struct tagPALETTEENTRY *LPPALETTEENTRY;

typedef struct  tagLOGPALETTE
    {
    UInt16 palVersion;
    UInt16 palNumEntries;
    PALETTEENTRY palPalEntry[ 1 ];
    }    LOGPALETTE;

typedef struct tagLOGPALETTE *PLOGPALETTE;

typedef struct tagLOGPALETTE *LPLOGPALETTE;

typedef UInt16 CLIPFORMAT;

typedef struct  tagMSG
    {
    HWND hwnd;
    UInt32 message;
    WPARAM wParam;
    LPARAM lParam;
    UInt32 time;
    POINT pt;
    }    MSG;

typedef struct tagMSG *PMSG;

typedef struct tagMSG *NPMSG;

typedef struct tagMSG *LPMSG;

typedef struct  tagLOADPARMS32
    {
    char* pEnvAddress;
    char* pCmdLine;
    char* pCmdShow;
    UInt32 dwReserved;
    }    LOADPARMS32;

#ifndef __IMarshal_INTERFACE_DEFINED__
#define __IMarshal_INTERFACE_DEFINED__

/* interface IMarshal */
/* [uuid][object][local] */

typedef /* [unique] */ IMarshal *PMARSHAL;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("00000003-0000-0000-C000-000000000046") IMarshal : public IUnknown
{
public:
    virtual CARAPI GetUnmarshalClass(
            /* [in] */ RIID riid,
            /* [unique][in] */ void *pv,
            /* [in] */ UInt32 dwDestContext,
            /* [unique][in] */ void *pvDestContext,
            /* [in] */ UInt32 mshlflags,
            /* [out] */ CLSID *pCid) = 0;

    virtual CARAPI GetMarshalSizeMax(
            /* [in] */ RIID riid,
            /* [unique][in] */ void *pv,
            /* [in] */ UInt32 dwDestContext,
            /* [unique][in] */ void *pvDestContext,
            /* [in] */ UInt32 mshlflags,
            /* [out] */ UInt32 *pSize) = 0;

    virtual CARAPI MarshalInterface(
            /* [unique][in] */ IStream *pStm,
            /* [in] */ RIID riid,
            /* [unique][in] */ void *pv,
            /* [in] */ UInt32 dwDestContext,
            /* [unique][in] */ void *pvDestContext,
            /* [in] */ UInt32 mshlflags) = 0;

    virtual CARAPI UnmarshalInterface(
            /* [unique][in] */ IStream *pStm,
            /* [in] */ RIID riid,
            /* [out] */ void **ppv) = 0;

    virtual CARAPI ReleaseMarshalData(
            /* [unique][in] */ IStream *pStm) = 0;

    virtual CARAPI DisconnectObject(
            /* [in] */ UInt32 dwReserved) = 0;
};

#else

typedef struct IMarshalVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IMarshal * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IMarshal * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IMarshal * This);

        ECode (CARAPICALLTYPE *GetUnmarshalClass )(
            IMarshal * This,
            /* [in] */ RIID riid,
            /* [unique][in] */ void *pv,
            /* [in] */ UInt32 dwDestContext,
            /* [unique][in] */ void *pvDestContext,
            /* [in] */ UInt32 mshlflags,
            /* [out] */ CLSID *pCid);

        ECode (CARAPICALLTYPE *GetMarshalSizeMax )(
            IMarshal * This,
            /* [in] */ RIID riid,
            /* [unique][in] */ void *pv,
            /* [in] */ UInt32 dwDestContext,
            /* [unique][in] */ void *pvDestContext,
            /* [in] */ UInt32 mshlflags,
            /* [out] */ UInt32 *pSize);

        ECode (CARAPICALLTYPE *MarshalInterface )(
            IMarshal * This,
            /* [unique][in] */ IStream *pStm,
            /* [in] */ RIID riid,
            /* [unique][in] */ void *pv,
            /* [in] */ UInt32 dwDestContext,
            /* [unique][in] */ void *pvDestContext,
            /* [in] */ UInt32 mshlflags);

        ECode (CARAPICALLTYPE *UnmarshalInterface )(
            IMarshal * This,
            /* [unique][in] */ IStream *pStm,
            /* [in] */ RIID riid,
            /* [out] */ void **ppv);

        ECode (CARAPICALLTYPE *ReleaseMarshalData )(
            IMarshal * This,
            /* [unique][in] */ IStream *pStm);

        ECode (CARAPICALLTYPE *DisconnectObject )(
            IMarshal * This,
            /* [in] */ UInt32 dwReserved);

    } IMarshalVtbl;

interface IMarshal
    {
        CONST_VTBL struct IMarshalVtbl *v;
    };

#ifdef COBJMACROS

#define IMarshal_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IMarshal_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IMarshal_Release(This)    \
    (This)->v -> Release(This)

#define IMarshal_GetUnmarshalClass(This,riid,pv,dwDestContext,pvDestContext,mshlflags,pCid)    \
    (This)->v -> GetUnmarshalClass(This,riid,pv,dwDestContext,pvDestContext,mshlflags,pCid)

#define IMarshal_GetMarshalSizeMax(This,riid,pv,dwDestContext,pvDestContext,mshlflags,pSize)    \
    (This)->v -> GetMarshalSizeMax(This,riid,pv,dwDestContext,pvDestContext,mshlflags,pSize)

#define IMarshal_MarshalInterface(This,pStm,riid,pv,dwDestContext,pvDestContext,mshlflags)    \
    (This)->v -> MarshalInterface(This,pStm,riid,pv,dwDestContext,pvDestContext,mshlflags)

#define IMarshal_UnmarshalInterface(This,pStm,riid,ppv)    \
    (This)->v -> UnmarshalInterface(This,pStm,riid,ppv)

#define IMarshal_ReleaseMarshalData(This,pStm)    \
    (This)->v -> ReleaseMarshalData(This,pStm)

#define IMarshal_DisconnectObject(This,dwReserved)    \
    (This)->v -> DisconnectObject(This,dwReserved)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IMarshal_INTERFACE_DEFINED__ */

#ifndef __IExternalConnection_INTERFACE_DEFINED__
#define __IExternalConnection_INTERFACE_DEFINED__

/* interface IExternalConnection */
/* [uuid][local][object] */

typedef /* [unique] */ IExternalConnection *PEXTERNALCONNECTION;

typedef
enum tagEXTCONN
    {    EXTCONN_STRONG = 0x1,
    EXTCONN_WEAK = 0x2,
    EXTCONN_CALLABLE = 0x4
    }    EXTCONN;

EXTERN_C const IID IID_IExternalConnection;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("00000019-0000-0000-C000-000000000046") IExternalConnection : public IUnknown
{
public:
    virtual UInt32 STDMETHODCALLTYPE AddConnection(
            /* [in] */ UInt32 extconn,
            /* [in] */ UInt32 reserved) = 0;

    virtual UInt32 STDMETHODCALLTYPE ReleaseConnection(
            /* [in] */ UInt32 extconn,
            /* [in] */ UInt32 reserved,
            /* [in] */ _ELASTOS Boolean fLastReleaseCloses) = 0;
};

#else

typedef struct IExternalConnectionVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IExternalConnection * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IExternalConnection * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IExternalConnection * This);

        UInt32 ( STDMETHODCALLTYPE *AddConnection )(
            IExternalConnection * This,
            /* [in] */ UInt32 extconn,
            /* [in] */ UInt32 reserved);

        UInt32 ( STDMETHODCALLTYPE *ReleaseConnection )(
            IExternalConnection * This,
            /* [in] */ UInt32 extconn,
            /* [in] */ UInt32 reserved,
            /* [in] */ _ELASTOS Boolean fLastReleaseCloses);

    } IExternalConnectionVtbl;

interface IExternalConnection
    {
        CONST_VTBL struct IExternalConnectionVtbl *v;
    };

#ifdef COBJMACROS

#define IExternalConnection_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IExternalConnection_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IExternalConnection_Release(This)    \
    (This)->v -> Release(This)

#define IExternalConnection_AddConnection(This,extconn,reserved)    \
    (This)->v -> AddConnection(This,extconn,reserved)

#define IExternalConnection_ReleaseConnection(This,extconn,reserved,fLastReleaseCloses)    \
    (This)->v -> ReleaseConnection(This,extconn,reserved,fLastReleaseCloses)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IExternalConnection_INTERFACE_DEFINED__ */

#ifndef __IEnumUnknown_INTERFACE_DEFINED__
#define __IEnumUnknown_INTERFACE_DEFINED__

/* interface IEnumUnknown */
/* [unique][uuid][object] */

typedef /* [unique] */ IEnumUnknown *PENUMUNKNOWN;

EXTERN_C const IID IID_IEnumUnknown;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("00000100-0000-0000-C000-000000000046") IEnumUnknown : public IUnknown
{
public:
    virtual /* [local] */ CARAPI Next(
            /* [in] */ UInt32 celt,
            /* [out] */ IUnknown **rgelt,
            /* [out] */ UInt32 *pceltFetched) = 0;

    virtual CARAPI Skip(
            /* [in] */ UInt32 celt) = 0;

    virtual CARAPI Reset( void) = 0;

    virtual CARAPI Clone(
            /* [out] */ IEnumUnknown **ppenum) = 0;
};

#else

typedef struct IEnumUnknownVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IEnumUnknown * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IEnumUnknown * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IEnumUnknown * This);

        /* [local] */ ECode (CARAPICALLTYPE *Next )(
            IEnumUnknown * This,
            /* [in] */ UInt32 celt,
            /* [out] */ IUnknown **rgelt,
            /* [out] */ UInt32 *pceltFetched);

        ECode (CARAPICALLTYPE *Skip )(
            IEnumUnknown * This,
            /* [in] */ UInt32 celt);

        ECode (CARAPICALLTYPE *Reset )(
            IEnumUnknown * This);

        ECode (CARAPICALLTYPE *Clone )(
            IEnumUnknown * This,
            /* [out] */ IEnumUnknown **ppenum);

    } IEnumUnknownVtbl;

interface IEnumUnknown
    {
        CONST_VTBL struct IEnumUnknownVtbl *v;
    };

#ifdef COBJMACROS

#define IEnumUnknown_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IEnumUnknown_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IEnumUnknown_Release(This)    \
    (This)->v -> Release(This)

#define IEnumUnknown_Next(This,celt,rgelt,pceltFetched)    \
    (This)->v -> Next(This,celt,rgelt,pceltFetched)

#define IEnumUnknown_Skip(This,celt)    \
    (This)->v -> Skip(This,celt)

#define IEnumUnknown_Reset(This)    \
    (This)->v -> Reset(This)

#define IEnumUnknown_Clone(This,ppenum)    \
    (This)->v -> Clone(This,ppenum)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IEnumUnknown_INTERFACE_DEFINED__ */

#ifndef __IBindCtx_INTERFACE_DEFINED__
#define __IBindCtx_INTERFACE_DEFINED__

/* interface IBindCtx */
/* [unique][uuid][object] */

typedef /* [unique] */ IBindCtx *PBINDCTX;

typedef struct  tagBIND_OPTS
    {
    UInt32 cbStruct;
    UInt32 grfFlags;
    UInt32 grfMode;
    UInt32 dwTickCountDeadline;
    }    BIND_OPTS;

typedef struct tagBIND_OPTS *PBIND_OPTS;

#if defined(__cplusplus)
typedef struct tagBIND_OPTS2 : tagBIND_OPTS{
    UInt32          dwTrackFlags;
    UInt32          dwClassContext;
    UInt32           locale;
    COSERVERINFO * pServerInfo;
} BIND_OPTS2, * PBIND_OPTS2;
#else
typedef struct  tagBIND_OPTS2
    {
    UInt32 cbStruct;
    UInt32 grfFlags;
    UInt32 grfMode;
    UInt32 dwTickCountDeadline;
    UInt32 dwTrackFlags;
    UInt32 dwClassContext;
    UInt32 locale;
    COSERVERINFO *pServerInfo;
    }    BIND_OPTS2;

typedef struct tagBIND_OPTS2 *PBIND_OPTS2;

#endif

EXTERN_C const IID IID_IBindCtx;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("0000000e-0000-0000-C000-000000000046") IBindCtx : public IUnknown
{
public:
    virtual CARAPI RegisterObjectBound(
            /* [unique][in] */ IUnknown *punk) = 0;

    virtual CARAPI RevokeObjectBound(
            /* [unique][in] */ IUnknown *punk) = 0;

    virtual CARAPI ReleaseBoundObjects( void) = 0;

    virtual /* [local] */ CARAPI SetBindOptions(
            /* [in] */ BIND_OPTS *pbindopts) = 0;

    virtual /* [local] */ CARAPI GetBindOptions(
            /* [out][in] */ BIND_OPTS *pbindopts) = 0;

    virtual CARAPI GetRunningObjectTable(
            /* [out] */ IRunningObjectTable **pprot) = 0;

    virtual CARAPI RegisterObjectParam(
            /* [in] */ wchar_t * pszKey,
            /* [unique][in] */ IUnknown *punk) = 0;

    virtual CARAPI GetObjectParam(
            /* [in] */ wchar_t * pszKey,
            /* [out] */ IUnknown **ppunk) = 0;

    virtual CARAPI EnumObjectParam(
            /* [out] */ IEnumString **ppenum) = 0;

    virtual CARAPI RevokeObjectParam(
            /* [in] */ wchar_t * pszKey) = 0;
};

#else

typedef struct IBindCtxVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IBindCtx * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IBindCtx * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IBindCtx * This);

        ECode (CARAPICALLTYPE *RegisterObjectBound )(
            IBindCtx * This,
            /* [unique][in] */ IUnknown *punk);

        ECode (CARAPICALLTYPE *RevokeObjectBound )(
            IBindCtx * This,
            /* [unique][in] */ IUnknown *punk);

        ECode (CARAPICALLTYPE *ReleaseBoundObjects )(
            IBindCtx * This);

        /* [local] */ ECode (CARAPICALLTYPE *SetBindOptions )(
            IBindCtx * This,
            /* [in] */ BIND_OPTS *pbindopts);

        /* [local] */ ECode (CARAPICALLTYPE *GetBindOptions )(
            IBindCtx * This,
            /* [out][in] */ BIND_OPTS *pbindopts);

        ECode (CARAPICALLTYPE *GetRunningObjectTable )(
            IBindCtx * This,
            /* [out] */ IRunningObjectTable **pprot);

        ECode (CARAPICALLTYPE *RegisterObjectParam )(
            IBindCtx * This,
            /* [in] */ wchar_t * pszKey,
            /* [unique][in] */ IUnknown *punk);

        ECode (CARAPICALLTYPE *GetObjectParam )(
            IBindCtx * This,
            /* [in] */ wchar_t * pszKey,
            /* [out] */ IUnknown **ppunk);

        ECode (CARAPICALLTYPE *EnumObjectParam )(
            IBindCtx * This,
            /* [out] */ IEnumString **ppenum);

        ECode (CARAPICALLTYPE *RevokeObjectParam )(
            IBindCtx * This,
            /* [in] */ wchar_t * pszKey);

    } IBindCtxVtbl;

interface IBindCtx
    {
        CONST_VTBL struct IBindCtxVtbl *v;
    };

#ifdef COBJMACROS

#define IBindCtx_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IBindCtx_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IBindCtx_Release(This)    \
    (This)->v -> Release(This)

#define IBindCtx_RegisterObjectBound(This,punk)    \
    (This)->v -> RegisterObjectBound(This,punk)

#define IBindCtx_RevokeObjectBound(This,punk)    \
    (This)->v -> RevokeObjectBound(This,punk)

#define IBindCtx_ReleaseBoundObjects(This)    \
    (This)->v -> ReleaseBoundObjects(This)

#define IBindCtx_SetBindOptions(This,pbindopts)    \
    (This)->v -> SetBindOptions(This,pbindopts)

#define IBindCtx_GetBindOptions(This,pbindopts)    \
    (This)->v -> GetBindOptions(This,pbindopts)

#define IBindCtx_GetRunningObjectTable(This,pprot)    \
    (This)->v -> GetRunningObjectTable(This,pprot)

#define IBindCtx_RegisterObjectParam(This,pszKey,punk)    \
    (This)->v -> RegisterObjectParam(This,pszKey,punk)

#define IBindCtx_GetObjectParam(This,pszKey,ppunk)    \
    (This)->v -> GetObjectParam(This,pszKey,ppunk)

#define IBindCtx_EnumObjectParam(This,ppenum)    \
    (This)->v -> EnumObjectParam(This,ppenum)

#define IBindCtx_RevokeObjectParam(This,pszKey)    \
    (This)->v -> RevokeObjectParam(This,pszKey)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IBindCtx_INTERFACE_DEFINED__ */

#ifndef __IEnumMoniker_INTERFACE_DEFINED__
#define __IEnumMoniker_INTERFACE_DEFINED__

/* interface IEnumMoniker */
/* [unique][uuid][object] */

typedef /* [unique] */ IEnumMoniker *PENUMMONIKER;

EXTERN_C const IID IID_IEnumMoniker;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("00000102-0000-0000-C000-000000000046") IEnumMoniker : public IUnknown
{
public:
    virtual /* [local] */ CARAPI Next(
            /* [in] */ UInt32 celt,
            /* [length_is][size_is][out] */ IMoniker **rgelt,
            /* [out] */ UInt32 *pceltFetched) = 0;

    virtual CARAPI Skip(
            /* [in] */ UInt32 celt) = 0;

    virtual CARAPI Reset( void) = 0;

    virtual CARAPI Clone(
            /* [out] */ IEnumMoniker **ppenum) = 0;
};

#else

typedef struct IEnumMonikerVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IEnumMoniker * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IEnumMoniker * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IEnumMoniker * This);

        /* [local] */ ECode (CARAPICALLTYPE *Next )(
            IEnumMoniker * This,
            /* [in] */ UInt32 celt,
            /* [length_is][size_is][out] */ IMoniker **rgelt,
            /* [out] */ UInt32 *pceltFetched);

        ECode (CARAPICALLTYPE *Skip )(
            IEnumMoniker * This,
            /* [in] */ UInt32 celt);

        ECode (CARAPICALLTYPE *Reset )(
            IEnumMoniker * This);

        ECode (CARAPICALLTYPE *Clone )(
            IEnumMoniker * This,
            /* [out] */ IEnumMoniker **ppenum);

    } IEnumMonikerVtbl;

interface IEnumMoniker
    {
        CONST_VTBL struct IEnumMonikerVtbl *v;
    };

#ifdef COBJMACROS

#define IEnumMoniker_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IEnumMoniker_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IEnumMoniker_Release(This)    \
    (This)->v -> Release(This)

#define IEnumMoniker_Next(This,celt,rgelt,pceltFetched)    \
    (This)->v -> Next(This,celt,rgelt,pceltFetched)

#define IEnumMoniker_Skip(This,celt)    \
    (This)->v -> Skip(This,celt)

#define IEnumMoniker_Reset(This)    \
    (This)->v -> Reset(This)

#define IEnumMoniker_Clone(This,ppenum)    \
    (This)->v -> Clone(This,ppenum)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IEnumMoniker_INTERFACE_DEFINED__ */

#ifndef __IRunnableObject_INTERFACE_DEFINED__
#define __IRunnableObject_INTERFACE_DEFINED__

/* interface IRunnableObject */
/* [uuid][object] */

typedef /* [unique] */ IRunnableObject *PRUNNABLEOBJECT;

EXTERN_C const IID IID_IRunnableObject;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("00000126-0000-0000-C000-000000000046") IRunnableObject : public IUnknown
{
public:
    virtual CARAPI GetRunningClass(
            /* [out] */ PCLSID lpClsid) = 0;

    virtual CARAPI Run(
            /* [in] */ PBINDCTX pbc) = 0;

    virtual /* [local] */ _ELASTOS Boolean STDMETHODCALLTYPE IsRunning( void) = 0;

    virtual CARAPI LockRunning(
            /* [in] */ _ELASTOS Boolean fLock,
            /* [in] */ _ELASTOS Boolean fLastUnlockCloses) = 0;

    virtual CARAPI SetContainedObject(
            /* [in] */ _ELASTOS Boolean fContained) = 0;
};

#else

typedef struct IRunnableObjectVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IRunnableObject * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IRunnableObject * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IRunnableObject * This);

        ECode (CARAPICALLTYPE *GetRunningClass )(
            IRunnableObject * This,
            /* [out] */ PCLSID lpClsid);

        ECode (CARAPICALLTYPE *Run )(
            IRunnableObject * This,
            /* [in] */ PBINDCTX pbc);

        /* [local] */ _ELASTOS Boolean ( STDMETHODCALLTYPE *IsRunning )(
            IRunnableObject * This);

        ECode (CARAPICALLTYPE *LockRunning )(
            IRunnableObject * This,
            /* [in] */ _ELASTOS Boolean fLock,
            /* [in] */ _ELASTOS Boolean fLastUnlockCloses);

        ECode (CARAPICALLTYPE *SetContainedObject )(
            IRunnableObject * This,
            /* [in] */ _ELASTOS Boolean fContained);

    } IRunnableObjectVtbl;

interface IRunnableObject
    {
        CONST_VTBL struct IRunnableObjectVtbl *v;
    };

#ifdef COBJMACROS

#define IRunnableObject_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IRunnableObject_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IRunnableObject_Release(This)    \
    (This)->v -> Release(This)

#define IRunnableObject_GetRunningClass(This,lpClsid)    \
    (This)->v -> GetRunningClass(This,lpClsid)

#define IRunnableObject_Run(This,pbc)    \
    (This)->v -> Run(This,pbc)

#define IRunnableObject_IsRunning(This)    \
    (This)->v -> IsRunning(This)

#define IRunnableObject_LockRunning(This,fLock,fLastUnlockCloses)    \
    (This)->v -> LockRunning(This,fLock,fLastUnlockCloses)

#define IRunnableObject_SetContainedObject(This,fContained)    \
    (This)->v -> SetContainedObject(This,fContained)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IRunnableObject_INTERFACE_DEFINED__ */

#ifndef __IRunningObjectTable_INTERFACE_DEFINED__
#define __IRunningObjectTable_INTERFACE_DEFINED__

/* interface IRunningObjectTable */
/* [uuid][object] */

typedef /* [unique] */ IRunningObjectTable *PRUNNINGOBJECTTABLE;

EXTERN_C const IID IID_IRunningObjectTable;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("00000010-0000-0000-C000-000000000046") IRunningObjectTable : public IUnknown
{
public:
    virtual CARAPI Register(
            /* [in] */ UInt32 grfFlags,
            /* [unique][in] */ IUnknown *punkObject,
            /* [unique][in] */ IMoniker *pmkObjectName,
            /* [out] */ UInt32 *pdwRegister) = 0;

    virtual CARAPI Revoke(
            /* [in] */ UInt32 dwRegister) = 0;

    virtual CARAPI IsRunning(
            /* [unique][in] */ IMoniker *pmkObjectName) = 0;

    virtual CARAPI GetObject(
            /* [unique][in] */ IMoniker *pmkObjectName,
            /* [out] */ IUnknown **ppunkObject) = 0;

    virtual CARAPI NoteChangeTime(
            /* [in] */ UInt32 dwRegister,
            /* [in] */ FILETIME *pfiletime) = 0;

    virtual CARAPI GetTimeOfLastChange(
            /* [unique][in] */ IMoniker *pmkObjectName,
            /* [out] */ FILETIME *pfiletime) = 0;

    virtual CARAPI EnumRunning(
            /* [out] */ IEnumMoniker **ppenumMoniker) = 0;
};

#else

typedef struct IRunningObjectTableVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IRunningObjectTable * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IRunningObjectTable * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IRunningObjectTable * This);

        ECode (CARAPICALLTYPE *Register )(
            IRunningObjectTable * This,
            /* [in] */ UInt32 grfFlags,
            /* [unique][in] */ IUnknown *punkObject,
            /* [unique][in] */ IMoniker *pmkObjectName,
            /* [out] */ UInt32 *pdwRegister);

        ECode (CARAPICALLTYPE *Revoke )(
            IRunningObjectTable * This,
            /* [in] */ UInt32 dwRegister);

        ECode (CARAPICALLTYPE *IsRunning )(
            IRunningObjectTable * This,
            /* [unique][in] */ IMoniker *pmkObjectName);

        ECode (CARAPICALLTYPE *GetObject )(
            IRunningObjectTable * This,
            /* [unique][in] */ IMoniker *pmkObjectName,
            /* [out] */ IUnknown **ppunkObject);

        ECode (CARAPICALLTYPE *NoteChangeTime )(
            IRunningObjectTable * This,
            /* [in] */ UInt32 dwRegister,
            /* [in] */ FILETIME *pfiletime);

        ECode (CARAPICALLTYPE *GetTimeOfLastChange )(
            IRunningObjectTable * This,
            /* [unique][in] */ IMoniker *pmkObjectName,
            /* [out] */ FILETIME *pfiletime);

        ECode (CARAPICALLTYPE *EnumRunning )(
            IRunningObjectTable * This,
            /* [out] */ IEnumMoniker **ppenumMoniker);

    } IRunningObjectTableVtbl;

interface IRunningObjectTable
    {
        CONST_VTBL struct IRunningObjectTableVtbl *v;
    };

#ifdef COBJMACROS

#define IRunningObjectTable_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IRunningObjectTable_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IRunningObjectTable_Release(This)    \
    (This)->v -> Release(This)

#define IRunningObjectTable_Register(This,grfFlags,punkObject,pmkObjectName,pdwRegister)    \
    (This)->v -> Register(This,grfFlags,punkObject,pmkObjectName,pdwRegister)

#define IRunningObjectTable_Revoke(This,dwRegister)    \
    (This)->v -> Revoke(This,dwRegister)

#define IRunningObjectTable_IsRunning(This,pmkObjectName)    \
    (This)->v -> IsRunning(This,pmkObjectName)

#define IRunningObjectTable_GetObject(This,pmkObjectName,ppunkObject)    \
    (This)->v -> GetObject(This,pmkObjectName,ppunkObject)

#define IRunningObjectTable_NoteChangeTime(This,dwRegister,pfiletime)    \
    (This)->v -> NoteChangeTime(This,dwRegister,pfiletime)

#define IRunningObjectTable_GetTimeOfLastChange(This,pmkObjectName,pfiletime)    \
    (This)->v -> GetTimeOfLastChange(This,pmkObjectName,pfiletime)

#define IRunningObjectTable_EnumRunning(This,ppenumMoniker)    \
    (This)->v -> EnumRunning(This,ppenumMoniker)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IRunningObjectTable_INTERFACE_DEFINED__ */

#ifndef __IPersist_INTERFACE_DEFINED__
#define __IPersist_INTERFACE_DEFINED__

/* interface IPersist */
/* [uuid][object] */

typedef /* [unique] */ IPersist *PPERSIST;

EXTERN_C const IID IID_IPersist;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("0000010c-0000-0000-C000-000000000046") IPersist : public IUnknown
{
public:
    virtual CARAPI GetClassID(
            /* [out] */ CLSID *pClassID) = 0;
};

#else

typedef struct IPersistVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IPersist * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IPersist * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IPersist * This);

        ECode (CARAPICALLTYPE *GetClassID )(
            IPersist * This,
            /* [out] */ CLSID *pClassID);

    } IPersistVtbl;

interface IPersist
    {
        CONST_VTBL struct IPersistVtbl *v;
    };

#ifdef COBJMACROS

#define IPersist_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IPersist_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IPersist_Release(This)    \
    (This)->v -> Release(This)

#define IPersist_GetClassID(This,pClassID)    \
    (This)->v -> GetClassID(This,pClassID)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IPersist_INTERFACE_DEFINED__ */

#ifndef __IPersistStream_INTERFACE_DEFINED__
#define __IPersistStream_INTERFACE_DEFINED__

/* interface IPersistStream */
/* [unique][uuid][object] */

typedef /* [unique] */ IPersistStream *PPERSISTSTREAM;

EXTERN_C const IID IID_IPersistStream;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("00000109-0000-0000-C000-000000000046") IPersistStream : public IPersist
{
public:
    virtual CARAPI IsDirty( void) = 0;

    virtual CARAPI Load(
            /* [unique][in] */ IStream *pStm) = 0;

    virtual CARAPI Save(
            /* [unique][in] */ IStream *pStm,
            /* [in] */ _ELASTOS Boolean fClearDirty) = 0;

    virtual CARAPI GetSizeMax(
            /* [out] */ ULARGE_INTEGER *pcbSize) = 0;
};

#else

typedef struct IPersistStreamVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IPersistStream * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IPersistStream * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IPersistStream * This);

        ECode (CARAPICALLTYPE *GetClassID )(
            IPersistStream * This,
            /* [out] */ CLSID *pClassID);

        ECode (CARAPICALLTYPE *IsDirty )(
            IPersistStream * This);

        ECode (CARAPICALLTYPE *Load )(
            IPersistStream * This,
            /* [unique][in] */ IStream *pStm);

        ECode (CARAPICALLTYPE *Save )(
            IPersistStream * This,
            /* [unique][in] */ IStream *pStm,
            /* [in] */ _ELASTOS Boolean fClearDirty);

        ECode (CARAPICALLTYPE *GetSizeMax )(
            IPersistStream * This,
            /* [out] */ ULARGE_INTEGER *pcbSize);

    } IPersistStreamVtbl;

interface IPersistStream
    {
        CONST_VTBL struct IPersistStreamVtbl *v;
    };

#ifdef COBJMACROS

#define IPersistStream_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IPersistStream_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IPersistStream_Release(This)    \
    (This)->v -> Release(This)

#define IPersistStream_GetClassID(This,pClassID)    \
    (This)->v -> GetClassID(This,pClassID)

#define IPersistStream_IsDirty(This)    \
    (This)->v -> IsDirty(This)

#define IPersistStream_Load(This,pStm)    \
    (This)->v -> Load(This,pStm)

#define IPersistStream_Save(This,pStm,fClearDirty)    \
    (This)->v -> Save(This,pStm,fClearDirty)

#define IPersistStream_GetSizeMax(This,pcbSize)    \
    (This)->v -> GetSizeMax(This,pcbSize)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IPersistStream_INTERFACE_DEFINED__ */

#ifndef __IMoniker_INTERFACE_DEFINED__
#define __IMoniker_INTERFACE_DEFINED__

/* interface IMoniker */
/* [unique][uuid][object] */

typedef /* [unique] */ IMoniker *PMONIKER;

EXTERN_C const IID IID_IMoniker;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("0000000f-0000-0000-C000-000000000046") IMoniker : public IPersistStream
{
public:
    virtual /* [local] */ CARAPI BindToObject(
            /* [unique][in] */ IBindCtx *pbc,
            /* [unique][in] */ IMoniker *pmkToLeft,
            /* [in] */ RIID riidResult,
            /* [iid_is][out] */ void **ppvResult) = 0;

    virtual /* [local] */ CARAPI BindToStorage(
            /* [unique][in] */ IBindCtx *pbc,
            /* [unique][in] */ IMoniker *pmkToLeft,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppvObj) = 0;

    virtual CARAPI Reduce(
            /* [unique][in] */ IBindCtx *pbc,
            /* [in] */ UInt32 dwReduceHowFar,
            /* [unique][out][in] */ IMoniker **ppmkToLeft,
            /* [out] */ IMoniker **ppmkReduced) = 0;

    virtual CARAPI ComposeWith(
            /* [unique][in] */ IMoniker *pmkRight,
            /* [in] */ _ELASTOS Boolean fOnlyIfNotGeneric,
            /* [out] */ IMoniker **ppmkComposite) = 0;

    virtual CARAPI Enum(
            /* [in] */ _ELASTOS Boolean fForward,
            /* [out] */ IEnumMoniker **ppenumMoniker) = 0;

    virtual CARAPI IsEqual(
            /* [unique][in] */ IMoniker *pmkOtherMoniker) = 0;

    virtual CARAPI Hash(
            /* [out] */ UInt32 *pdwHash) = 0;

    virtual CARAPI IsRunning(
            /* [unique][in] */ IBindCtx *pbc,
            /* [unique][in] */ IMoniker *pmkToLeft,
            /* [unique][in] */ IMoniker *pmkNewlyRunning) = 0;

    virtual CARAPI GetTimeOfLastChange(
            /* [unique][in] */ IBindCtx *pbc,
            /* [unique][in] */ IMoniker *pmkToLeft,
            /* [out] */ FILETIME *pFileTime) = 0;

    virtual CARAPI Inverse(
            /* [out] */ IMoniker **ppmk) = 0;

    virtual CARAPI CommonPrefixWith(
            /* [unique][in] */ IMoniker *pmkOther,
            /* [out] */ IMoniker **ppmkPrefix) = 0;

    virtual CARAPI RelativePathTo(
            /* [unique][in] */ IMoniker *pmkOther,
            /* [out] */ IMoniker **ppmkRelPath) = 0;

    virtual CARAPI GetDisplayName(
            /* [unique][in] */ IBindCtx *pbc,
            /* [unique][in] */ IMoniker *pmkToLeft,
            /* [out] */ wchar_t * *ppszDisplayName) = 0;

    virtual CARAPI ParseDisplayName(
            /* [unique][in] */ IBindCtx *pbc,
            /* [unique][in] */ IMoniker *pmkToLeft,
            /* [in] */ wchar_t * pszDisplayName,
            /* [out] */ UInt32 *pchEaten,
            /* [out] */ IMoniker **ppmkOut) = 0;

    virtual CARAPI IsSystemMoniker(
            /* [out] */ UInt32 *pdwMksys) = 0;
};

#else

typedef struct IMonikerVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IMoniker * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IMoniker * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IMoniker * This);

        ECode (CARAPICALLTYPE *GetClassID )(
            IMoniker * This,
            /* [out] */ CLSID *pClassID);

        ECode (CARAPICALLTYPE *IsDirty )(
            IMoniker * This);

        ECode (CARAPICALLTYPE *Load )(
            IMoniker * This,
            /* [unique][in] */ IStream *pStm);

        ECode (CARAPICALLTYPE *Save )(
            IMoniker * This,
            /* [unique][in] */ IStream *pStm,
            /* [in] */ _ELASTOS Boolean fClearDirty);

        ECode (CARAPICALLTYPE *GetSizeMax )(
            IMoniker * This,
            /* [out] */ ULARGE_INTEGER *pcbSize);

        /* [local] */ ECode (CARAPICALLTYPE *BindToObject )(
            IMoniker * This,
            /* [unique][in] */ IBindCtx *pbc,
            /* [unique][in] */ IMoniker *pmkToLeft,
            /* [in] */ RIID riidResult,
            /* [iid_is][out] */ void **ppvResult);

        /* [local] */ ECode (CARAPICALLTYPE *BindToStorage )(
            IMoniker * This,
            /* [unique][in] */ IBindCtx *pbc,
            /* [unique][in] */ IMoniker *pmkToLeft,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppvObj);

        ECode (CARAPICALLTYPE *Reduce )(
            IMoniker * This,
            /* [unique][in] */ IBindCtx *pbc,
            /* [in] */ UInt32 dwReduceHowFar,
            /* [unique][out][in] */ IMoniker **ppmkToLeft,
            /* [out] */ IMoniker **ppmkReduced);

        ECode (CARAPICALLTYPE *ComposeWith )(
            IMoniker * This,
            /* [unique][in] */ IMoniker *pmkRight,
            /* [in] */ _ELASTOS Boolean fOnlyIfNotGeneric,
            /* [out] */ IMoniker **ppmkComposite);

        ECode (CARAPICALLTYPE *Enum )(
            IMoniker * This,
            /* [in] */ _ELASTOS Boolean fForward,
            /* [out] */ IEnumMoniker **ppenumMoniker);

        ECode (CARAPICALLTYPE *IsEqual )(
            IMoniker * This,
            /* [unique][in] */ IMoniker *pmkOtherMoniker);

        ECode (CARAPICALLTYPE *Hash )(
            IMoniker * This,
            /* [out] */ UInt32 *pdwHash);

        ECode (CARAPICALLTYPE *IsRunning )(
            IMoniker * This,
            /* [unique][in] */ IBindCtx *pbc,
            /* [unique][in] */ IMoniker *pmkToLeft,
            /* [unique][in] */ IMoniker *pmkNewlyRunning);

        ECode (CARAPICALLTYPE *GetTimeOfLastChange )(
            IMoniker * This,
            /* [unique][in] */ IBindCtx *pbc,
            /* [unique][in] */ IMoniker *pmkToLeft,
            /* [out] */ FILETIME *pFileTime);

        ECode (CARAPICALLTYPE *Inverse )(
            IMoniker * This,
            /* [out] */ IMoniker **ppmk);

        ECode (CARAPICALLTYPE *CommonPrefixWith )(
            IMoniker * This,
            /* [unique][in] */ IMoniker *pmkOther,
            /* [out] */ IMoniker **ppmkPrefix);

        ECode (CARAPICALLTYPE *RelativePathTo )(
            IMoniker * This,
            /* [unique][in] */ IMoniker *pmkOther,
            /* [out] */ IMoniker **ppmkRelPath);

        ECode (CARAPICALLTYPE *GetDisplayName )(
            IMoniker * This,
            /* [unique][in] */ IBindCtx *pbc,
            /* [unique][in] */ IMoniker *pmkToLeft,
            /* [out] */ wchar_t * *ppszDisplayName);

        ECode (CARAPICALLTYPE *ParseDisplayName )(
            IMoniker * This,
            /* [unique][in] */ IBindCtx *pbc,
            /* [unique][in] */ IMoniker *pmkToLeft,
            /* [in] */ wchar_t * pszDisplayName,
            /* [out] */ UInt32 *pchEaten,
            /* [out] */ IMoniker **ppmkOut);

        ECode (CARAPICALLTYPE *IsSystemMoniker )(
            IMoniker * This,
            /* [out] */ UInt32 *pdwMksys);

    } IMonikerVtbl;

interface IMoniker
    {
        CONST_VTBL struct IMonikerVtbl *v;
    };

#ifdef COBJMACROS

#define IMoniker_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IMoniker_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IMoniker_Release(This)    \
    (This)->v -> Release(This)

#define IMoniker_GetClassID(This,pClassID)    \
    (This)->v -> GetClassID(This,pClassID)

#define IMoniker_IsDirty(This)    \
    (This)->v -> IsDirty(This)

#define IMoniker_Load(This,pStm)    \
    (This)->v -> Load(This,pStm)

#define IMoniker_Save(This,pStm,fClearDirty)    \
    (This)->v -> Save(This,pStm,fClearDirty)

#define IMoniker_GetSizeMax(This,pcbSize)    \
    (This)->v -> GetSizeMax(This,pcbSize)

#define IMoniker_BindToObject(This,pbc,pmkToLeft,riidResult,ppvResult)    \
    (This)->v -> BindToObject(This,pbc,pmkToLeft,riidResult,ppvResult)

#define IMoniker_BindToStorage(This,pbc,pmkToLeft,riid,ppvObj)    \
    (This)->v -> BindToStorage(This,pbc,pmkToLeft,riid,ppvObj)

#define IMoniker_Reduce(This,pbc,dwReduceHowFar,ppmkToLeft,ppmkReduced)    \
    (This)->v -> Reduce(This,pbc,dwReduceHowFar,ppmkToLeft,ppmkReduced)

#define IMoniker_ComposeWith(This,pmkRight,fOnlyIfNotGeneric,ppmkComposite)    \
    (This)->v -> ComposeWith(This,pmkRight,fOnlyIfNotGeneric,ppmkComposite)

#define IMoniker_Enum(This,fForward,ppenumMoniker)    \
    (This)->v -> Enum(This,fForward,ppenumMoniker)

#define IMoniker_IsEqual(This,pmkOtherMoniker)    \
    (This)->v -> IsEqual(This,pmkOtherMoniker)

#define IMoniker_Hash(This,pdwHash)    \
    (This)->v -> Hash(This,pdwHash)

#define IMoniker_IsRunning(This,pbc,pmkToLeft,pmkNewlyRunning)    \
    (This)->v -> IsRunning(This,pbc,pmkToLeft,pmkNewlyRunning)

#define IMoniker_GetTimeOfLastChange(This,pbc,pmkToLeft,pFileTime)    \
    (This)->v -> GetTimeOfLastChange(This,pbc,pmkToLeft,pFileTime)

#define IMoniker_Inverse(This,ppmk)    \
    (This)->v -> Inverse(This,ppmk)

#define IMoniker_CommonPrefixWith(This,pmkOther,ppmkPrefix)    \
    (This)->v -> CommonPrefixWith(This,pmkOther,ppmkPrefix)

#define IMoniker_RelativePathTo(This,pmkOther,ppmkRelPath)    \
    (This)->v -> RelativePathTo(This,pmkOther,ppmkRelPath)

#define IMoniker_GetDisplayName(This,pbc,pmkToLeft,ppszDisplayName)    \
    (This)->v -> GetDisplayName(This,pbc,pmkToLeft,ppszDisplayName)

#define IMoniker_ParseDisplayName(This,pbc,pmkToLeft,pszDisplayName,pchEaten,ppmkOut)    \
    (This)->v -> ParseDisplayName(This,pbc,pmkToLeft,pszDisplayName,pchEaten,ppmkOut)

#define IMoniker_IsSystemMoniker(This,pdwMksys)    \
    (This)->v -> IsSystemMoniker(This,pdwMksys)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IMoniker_INTERFACE_DEFINED__ */

#ifndef __IEnumString_INTERFACE_DEFINED__
#define __IEnumString_INTERFACE_DEFINED__

/* interface IEnumString */
/* [unique][uuid][object] */

typedef /* [unique] */ IEnumString *PENUMSTRING;

EXTERN_C const IID IID_IEnumString;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("00000101-0000-0000-C000-000000000046") IEnumString : public IUnknown
{
public:
    virtual /* [local] */ CARAPI Next(
            /* [in] */ UInt32 celt,
            /* [length_is][size_is][out] */ wchar_t * *rgelt,
            /* [out] */ UInt32 *pceltFetched) = 0;

    virtual CARAPI Skip(
            /* [in] */ UInt32 celt) = 0;

    virtual CARAPI Reset( void) = 0;

    virtual CARAPI Clone(
            /* [out] */ IEnumString **ppenum) = 0;
};

#else

typedef struct IEnumStringVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IEnumString * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IEnumString * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IEnumString * This);

        /* [local] */ ECode (CARAPICALLTYPE *Next )(
            IEnumString * This,
            /* [in] */ UInt32 celt,
            /* [length_is][size_is][out] */ wchar_t * *rgelt,
            /* [out] */ UInt32 *pceltFetched);

        ECode (CARAPICALLTYPE *Skip )(
            IEnumString * This,
            /* [in] */ UInt32 celt);

        ECode (CARAPICALLTYPE *Reset )(
            IEnumString * This);

        ECode (CARAPICALLTYPE *Clone )(
            IEnumString * This,
            /* [out] */ IEnumString **ppenum);

    } IEnumStringVtbl;

interface IEnumString
    {
        CONST_VTBL struct IEnumStringVtbl *v;
    };

#ifdef COBJMACROS

#define IEnumString_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IEnumString_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IEnumString_Release(This)    \
    (This)->v -> Release(This)

#define IEnumString_Next(This,celt,rgelt,pceltFetched)    \
    (This)->v -> Next(This,celt,rgelt,pceltFetched)

#define IEnumString_Skip(This,celt)    \
    (This)->v -> Skip(This,celt)

#define IEnumString_Reset(This)    \
    (This)->v -> Reset(This)

#define IEnumString_Clone(This,ppenum)    \
    (This)->v -> Clone(This,ppenum)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IEnumString_INTERFACE_DEFINED__ */

#ifndef __IEnumSTATSTG_INTERFACE_DEFINED__
#define __IEnumSTATSTG_INTERFACE_DEFINED__

/* interface IEnumSTATSTG */
/* [unique][uuid][object] */

typedef /* [unique] */ IEnumSTATSTG *PENUMSTATSTG;

EXTERN_C const IID IID_IEnumSTATSTG;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("0000000d-0000-0000-C000-000000000046") IEnumSTATSTG : public IUnknown
{
public:
    virtual /* [local] */ CARAPI Next(
            /* [in] */ UInt32 celt,
            /* [length_is][size_is][out] */ STATSTG *rgelt,
            /* [out] */ UInt32 *pceltFetched) = 0;

    virtual CARAPI Skip(
            /* [in] */ UInt32 celt) = 0;

    virtual CARAPI Reset( void) = 0;

    virtual CARAPI Clone(
            /* [out] */ IEnumSTATSTG **ppenum) = 0;
};

#else

typedef struct IEnumSTATSTGVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IEnumSTATSTG * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IEnumSTATSTG * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IEnumSTATSTG * This);

        /* [local] */ ECode (CARAPICALLTYPE *Next )(
            IEnumSTATSTG * This,
            /* [in] */ UInt32 celt,
            /* [length_is][size_is][out] */ STATSTG *rgelt,
            /* [out] */ UInt32 *pceltFetched);

        ECode (CARAPICALLTYPE *Skip )(
            IEnumSTATSTG * This,
            /* [in] */ UInt32 celt);

        ECode (CARAPICALLTYPE *Reset )(
            IEnumSTATSTG * This);

        ECode (CARAPICALLTYPE *Clone )(
            IEnumSTATSTG * This,
            /* [out] */ IEnumSTATSTG **ppenum);

    } IEnumSTATSTGVtbl;

interface IEnumSTATSTG
    {
        CONST_VTBL struct IEnumSTATSTGVtbl *v;
    };

#ifdef COBJMACROS

#define IEnumSTATSTG_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IEnumSTATSTG_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IEnumSTATSTG_Release(This)    \
    (This)->v -> Release(This)

#define IEnumSTATSTG_Next(This,celt,rgelt,pceltFetched)    \
    (This)->v -> Next(This,celt,rgelt,pceltFetched)

#define IEnumSTATSTG_Skip(This,celt)    \
    (This)->v -> Skip(This,celt)

#define IEnumSTATSTG_Reset(This)    \
    (This)->v -> Reset(This)

#define IEnumSTATSTG_Clone(This,ppenum)    \
    (This)->v -> Clone(This,ppenum)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IEnumSTATSTG_INTERFACE_DEFINED__ */

#ifndef __IStorage_INTERFACE_DEFINED__
#define __IStorage_INTERFACE_DEFINED__

/* interface IStorage */
/* [unique][uuid][object] */

typedef /* [unique] */ IStorage *PSTORAGE;

typedef wchar_t **SNB;

EXTERN_C const IID IID_IStorage;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("0000000b-0000-0000-C000-000000000046") IStorage : public IUnknown
{
public:
    virtual CARAPI CreateStream(
            /* [string][in] */ const wchar_t *pwcsName,
            /* [in] */ UInt32 grfMode,
            /* [in] */ UInt32 reserved1,
            /* [in] */ UInt32 reserved2,
            /* [out] */ IStream **ppstm) = 0;

    virtual /* [local] */ CARAPI OpenStream(
            /* [string][in] */ const wchar_t *pwcsName,
            /* [unique][in] */ void *reserved1,
            /* [in] */ UInt32 grfMode,
            /* [in] */ UInt32 reserved2,
            /* [out] */ IStream **ppstm) = 0;

    virtual CARAPI CreateStorage(
            /* [string][in] */ const wchar_t *pwcsName,
            /* [in] */ UInt32 grfMode,
            /* [in] */ UInt32 reserved1,
            /* [in] */ UInt32 reserved2,
            /* [out] */ IStorage **ppstg) = 0;

    virtual CARAPI OpenStorage(
            /* [string][unique][in] */ const wchar_t *pwcsName,
            /* [unique][in] */ IStorage *pstgPriority,
            /* [in] */ UInt32 grfMode,
            /* [unique][in] */ SNB snbExclude,
            /* [in] */ UInt32 reserved,
            /* [out] */ IStorage **ppstg) = 0;

    virtual CARAPI CopyTo(
            /* [in] */ UInt32 ciidExclude,
            /* [size_is][unique][in] */ const IID *rgiidExclude,
            /* [unique][in] */ SNB snbExclude,
            /* [unique][in] */ IStorage *pstgDest) = 0;

    virtual CARAPI MoveElementTo(
            /* [string][in] */ const wchar_t *pwcsName,
            /* [unique][in] */ IStorage *pstgDest,
            /* [string][in] */ const wchar_t *pwcsNewName,
            /* [in] */ UInt32 grfFlags) = 0;

    virtual CARAPI Commit(
            /* [in] */ UInt32 grfCommitFlags) = 0;

    virtual CARAPI Revert( void) = 0;

    virtual /* [local] */ CARAPI EnumElements(
            /* [in] */ UInt32 reserved1,
            /* [size_is][unique][in] */ void *reserved2,
            /* [in] */ UInt32 reserved3,
            /* [out] */ IEnumSTATSTG **ppenum) = 0;

    virtual CARAPI DestroyElement(
            /* [string][in] */ const wchar_t *pwcsName) = 0;

    virtual CARAPI RenameElement(
            /* [string][in] */ const wchar_t *pwcsOldName,
            /* [string][in] */ const wchar_t *pwcsNewName) = 0;

    virtual CARAPI SetElementTimes(
            /* [string][unique][in] */ const wchar_t *pwcsName,
            /* [unique][in] */ const FILETIME *pctime,
            /* [unique][in] */ const FILETIME *patime,
            /* [unique][in] */ const FILETIME *pmtime) = 0;

    virtual CARAPI SetClass(
            /* [in] */ REFCLSID clsid) = 0;

    virtual CARAPI SetStateBits(
            /* [in] */ UInt32 grfStateBits,
            /* [in] */ UInt32 grfMask) = 0;

    virtual CARAPI Stat(
            /* [out] */ STATSTG *pstatstg,
            /* [in] */ UInt32 grfStatFlag) = 0;
};

#else

typedef struct IStorageVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IStorage * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IStorage * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IStorage * This);

        ECode (CARAPICALLTYPE *CreateStream )(
            IStorage * This,
            /* [string][in] */ const wchar_t *pwcsName,
            /* [in] */ UInt32 grfMode,
            /* [in] */ UInt32 reserved1,
            /* [in] */ UInt32 reserved2,
            /* [out] */ IStream **ppstm);

        /* [local] */ ECode (CARAPICALLTYPE *OpenStream )(
            IStorage * This,
            /* [string][in] */ const wchar_t *pwcsName,
            /* [unique][in] */ void *reserved1,
            /* [in] */ UInt32 grfMode,
            /* [in] */ UInt32 reserved2,
            /* [out] */ IStream **ppstm);

        ECode (CARAPICALLTYPE *CreateStorage )(
            IStorage * This,
            /* [string][in] */ const wchar_t *pwcsName,
            /* [in] */ UInt32 grfMode,
            /* [in] */ UInt32 reserved1,
            /* [in] */ UInt32 reserved2,
            /* [out] */ IStorage **ppstg);

        ECode (CARAPICALLTYPE *OpenStorage )(
            IStorage * This,
            /* [string][unique][in] */ const wchar_t *pwcsName,
            /* [unique][in] */ IStorage *pstgPriority,
            /* [in] */ UInt32 grfMode,
            /* [unique][in] */ SNB snbExclude,
            /* [in] */ UInt32 reserved,
            /* [out] */ IStorage **ppstg);

        ECode (CARAPICALLTYPE *CopyTo )(
            IStorage * This,
            /* [in] */ UInt32 ciidExclude,
            /* [size_is][unique][in] */ const IID *rgiidExclude,
            /* [unique][in] */ SNB snbExclude,
            /* [unique][in] */ IStorage *pstgDest);

        ECode (CARAPICALLTYPE *MoveElementTo )(
            IStorage * This,
            /* [string][in] */ const wchar_t *pwcsName,
            /* [unique][in] */ IStorage *pstgDest,
            /* [string][in] */ const wchar_t *pwcsNewName,
            /* [in] */ UInt32 grfFlags);

        ECode (CARAPICALLTYPE *Commit )(
            IStorage * This,
            /* [in] */ UInt32 grfCommitFlags);

        ECode (CARAPICALLTYPE *Revert )(
            IStorage * This);

        /* [local] */ ECode (CARAPICALLTYPE *EnumElements )(
            IStorage * This,
            /* [in] */ UInt32 reserved1,
            /* [size_is][unique][in] */ void *reserved2,
            /* [in] */ UInt32 reserved3,
            /* [out] */ IEnumSTATSTG **ppenum);

        ECode (CARAPICALLTYPE *DestroyElement )(
            IStorage * This,
            /* [string][in] */ const wchar_t *pwcsName);

        ECode (CARAPICALLTYPE *RenameElement )(
            IStorage * This,
            /* [string][in] */ const wchar_t *pwcsOldName,
            /* [string][in] */ const wchar_t *pwcsNewName);

        ECode (CARAPICALLTYPE *SetElementTimes )(
            IStorage * This,
            /* [string][unique][in] */ const wchar_t *pwcsName,
            /* [unique][in] */ const FILETIME *pctime,
            /* [unique][in] */ const FILETIME *patime,
            /* [unique][in] */ const FILETIME *pmtime);

        ECode (CARAPICALLTYPE *SetClass )(
            IStorage * This,
            /* [in] */ REFCLSID clsid);

        ECode (CARAPICALLTYPE *SetStateBits )(
            IStorage * This,
            /* [in] */ UInt32 grfStateBits,
            /* [in] */ UInt32 grfMask);

        ECode (CARAPICALLTYPE *Stat )(
            IStorage * This,
            /* [out] */ STATSTG *pstatstg,
            /* [in] */ UInt32 grfStatFlag);

    } IStorageVtbl;

interface IStorage
    {
        CONST_VTBL struct IStorageVtbl *v;
    };

#ifdef COBJMACROS

#define IStorage_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IStorage_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IStorage_Release(This)    \
    (This)->v -> Release(This)

#define IStorage_CreateStream(This,pwcsName,grfMode,reserved1,reserved2,ppstm)    \
    (This)->v -> CreateStream(This,pwcsName,grfMode,reserved1,reserved2,ppstm)

#define IStorage_OpenStream(This,pwcsName,reserved1,grfMode,reserved2,ppstm)    \
    (This)->v -> OpenStream(This,pwcsName,reserved1,grfMode,reserved2,ppstm)

#define IStorage_CreateStorage(This,pwcsName,grfMode,reserved1,reserved2,ppstg)    \
    (This)->v -> CreateStorage(This,pwcsName,grfMode,reserved1,reserved2,ppstg)

#define IStorage_OpenStorage(This,pwcsName,pstgPriority,grfMode,snbExclude,reserved,ppstg)    \
    (This)->v -> OpenStorage(This,pwcsName,pstgPriority,grfMode,snbExclude,reserved,ppstg)

#define IStorage_CopyTo(This,ciidExclude,rgiidExclude,snbExclude,pstgDest)    \
    (This)->v -> CopyTo(This,ciidExclude,rgiidExclude,snbExclude,pstgDest)

#define IStorage_MoveElementTo(This,pwcsName,pstgDest,pwcsNewName,grfFlags)    \
    (This)->v -> MoveElementTo(This,pwcsName,pstgDest,pwcsNewName,grfFlags)

#define IStorage_Commit(This,grfCommitFlags)    \
    (This)->v -> Commit(This,grfCommitFlags)

#define IStorage_Revert(This)    \
    (This)->v -> Revert(This)

#define IStorage_EnumElements(This,reserved1,reserved2,reserved3,ppenum)    \
    (This)->v -> EnumElements(This,reserved1,reserved2,reserved3,ppenum)

#define IStorage_DestroyElement(This,pwcsName)    \
    (This)->v -> DestroyElement(This,pwcsName)

#define IStorage_RenameElement(This,pwcsOldName,pwcsNewName)    \
    (This)->v -> RenameElement(This,pwcsOldName,pwcsNewName)

#define IStorage_SetElementTimes(This,pwcsName,pctime,patime,pmtime)    \
    (This)->v -> SetElementTimes(This,pwcsName,pctime,patime,pmtime)

#define IStorage_SetClass(This,clsid)    \
    (This)->v -> SetClass(This,clsid)

#define IStorage_SetStateBits(This,grfStateBits,grfMask)    \
    (This)->v -> SetStateBits(This,grfStateBits,grfMask)

#define IStorage_Stat(This,pstatstg,grfStatFlag)    \
    (This)->v -> Stat(This,pstatstg,grfStatFlag)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IStorage_INTERFACE_DEFINED__ */

#ifndef __IPersistFile_INTERFACE_DEFINED__
#define __IPersistFile_INTERFACE_DEFINED__

/* interface IPersistFile */
/* [unique][uuid][object] */

typedef /* [unique] */ IPersistFile *PPERSISTFILE;

EXTERN_C const IID IID_IPersistFile;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("0000010b-0000-0000-C000-000000000046") IPersistFile : public IPersist
{
public:
    virtual CARAPI IsDirty( void) = 0;

    virtual CARAPI Load(
            /* [in] */ const wchar_t* pszFileName,
            /* [in] */ UInt32 dwMode) = 0;

    virtual CARAPI Save(
            /* [unique][in] */ const wchar_t* pszFileName,
            /* [in] */ _ELASTOS Boolean fRemember) = 0;

    virtual CARAPI SaveCompleted(
            /* [unique][in] */ const wchar_t* pszFileName) = 0;

    virtual CARAPI GetCurFile(
            /* [out] */ wchar_t * *ppszFileName) = 0;
};

#else

typedef struct IPersistFileVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IPersistFile * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IPersistFile * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IPersistFile * This);

        ECode (CARAPICALLTYPE *GetClassID )(
            IPersistFile * This,
            /* [out] */ CLSID *pClassID);

        ECode (CARAPICALLTYPE *IsDirty )(
            IPersistFile * This);

        ECode (CARAPICALLTYPE *Load )(
            IPersistFile * This,
            /* [in] */ const wchar_t* pszFileName,
            /* [in] */ UInt32 dwMode);

        ECode (CARAPICALLTYPE *Save )(
            IPersistFile * This,
            /* [unique][in] */ const wchar_t* pszFileName,
            /* [in] */ _ELASTOS Boolean fRemember);

        ECode (CARAPICALLTYPE *SaveCompleted )(
            IPersistFile * This,
            /* [unique][in] */ const wchar_t* pszFileName);

        ECode (CARAPICALLTYPE *GetCurFile )(
            IPersistFile * This,
            /* [out] */ wchar_t * *ppszFileName);

    } IPersistFileVtbl;

interface IPersistFile
    {
        CONST_VTBL struct IPersistFileVtbl *v;
    };

#ifdef COBJMACROS

#define IPersistFile_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IPersistFile_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IPersistFile_Release(This)    \
    (This)->v -> Release(This)

#define IPersistFile_GetClassID(This,pClassID)    \
    (This)->v -> GetClassID(This,pClassID)

#define IPersistFile_IsDirty(This)    \
    (This)->v -> IsDirty(This)

#define IPersistFile_Load(This,pszFileName,dwMode)    \
    (This)->v -> Load(This,pszFileName,dwMode)

#define IPersistFile_Save(This,pszFileName,fRemember)    \
    (This)->v -> Save(This,pszFileName,fRemember)

#define IPersistFile_SaveCompleted(This,pszFileName)    \
    (This)->v -> SaveCompleted(This,pszFileName)

#define IPersistFile_GetCurFile(This,ppszFileName)    \
    (This)->v -> GetCurFile(This,ppszFileName)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IPersistFile_INTERFACE_DEFINED__ */

#ifndef __IPersistStorage_INTERFACE_DEFINED__
#define __IPersistStorage_INTERFACE_DEFINED__

/* interface IPersistStorage */
/* [unique][uuid][object] */

typedef /* [unique] */ IPersistStorage *PPERSISTSTORAGE;

EXTERN_C const IID IID_IPersistStorage;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("0000010a-0000-0000-C000-000000000046") IPersistStorage : public IPersist
{
public:
    virtual CARAPI IsDirty( void) = 0;

    virtual CARAPI InitNew(
            /* [unique][in] */ IStorage *pStg) = 0;

    virtual CARAPI Load(
            /* [unique][in] */ IStorage *pStg) = 0;

    virtual CARAPI Save(
            /* [unique][in] */ IStorage *pStgSave,
            /* [in] */ _ELASTOS Boolean fSameAsLoad) = 0;

    virtual CARAPI SaveCompleted(
            /* [unique][in] */ IStorage *pStgNew) = 0;

    virtual CARAPI HandsOffStorage( void) = 0;
};

#else

typedef struct IPersistStorageVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IPersistStorage * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IPersistStorage * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IPersistStorage * This);

        ECode (CARAPICALLTYPE *GetClassID )(
            IPersistStorage * This,
            /* [out] */ CLSID *pClassID);

        ECode (CARAPICALLTYPE *IsDirty )(
            IPersistStorage * This);

        ECode (CARAPICALLTYPE *InitNew )(
            IPersistStorage * This,
            /* [unique][in] */ IStorage *pStg);

        ECode (CARAPICALLTYPE *Load )(
            IPersistStorage * This,
            /* [unique][in] */ IStorage *pStg);

        ECode (CARAPICALLTYPE *Save )(
            IPersistStorage * This,
            /* [unique][in] */ IStorage *pStgSave,
            /* [in] */ _ELASTOS Boolean fSameAsLoad);

        ECode (CARAPICALLTYPE *SaveCompleted )(
            IPersistStorage * This,
            /* [unique][in] */ IStorage *pStgNew);

        ECode (CARAPICALLTYPE *HandsOffStorage )(
            IPersistStorage * This);

    } IPersistStorageVtbl;

interface IPersistStorage
    {
        CONST_VTBL struct IPersistStorageVtbl *v;
    };

#ifdef COBJMACROS

#define IPersistStorage_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IPersistStorage_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IPersistStorage_Release(This)    \
    (This)->v -> Release(This)

#define IPersistStorage_GetClassID(This,pClassID)    \
    (This)->v -> GetClassID(This,pClassID)

#define IPersistStorage_IsDirty(This)    \
    (This)->v -> IsDirty(This)

#define IPersistStorage_InitNew(This,pStg)    \
    (This)->v -> InitNew(This,pStg)

#define IPersistStorage_Load(This,pStg)    \
    (This)->v -> Load(This,pStg)

#define IPersistStorage_Save(This,pStgSave,fSameAsLoad)    \
    (This)->v -> Save(This,pStgSave,fSameAsLoad)

#define IPersistStorage_SaveCompleted(This,pStgNew)    \
    (This)->v -> SaveCompleted(This,pStgNew)

#define IPersistStorage_HandsOffStorage(This)    \
    (This)->v -> HandsOffStorage(This)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IPersistStorage_INTERFACE_DEFINED__ */

#ifndef __IEnumFORMATETC_INTERFACE_DEFINED__
#define __IEnumFORMATETC_INTERFACE_DEFINED__

/* interface IEnumFORMATETC */
/* [unique][uuid][object] */

typedef /* [unique] */ IEnumFORMATETC *PENUMFORMATETC;

typedef struct  tagDVTARGETDEVICE
    {
    UInt32 tdSize;
    UInt16 tdDriverNameOffset;
    UInt16 tdDeviceNameOffset;
    UInt16 tdPortNameOffset;
    UInt16 tdExtDevmodeOffset;
    /* [size_is] */ Byte tdData[ 1 ];
    }    DVTARGETDEVICE;

typedef CLIPFORMAT *PCLIPFORMAT;

typedef struct  tagFORMATETC
    {
    CLIPFORMAT cfFormat;
    /* [unique] */ DVTARGETDEVICE *ptd;
    UInt32 dwAspect;
    Int32 lindex;
    UInt32 tymed;
    }    FORMATETC;

typedef struct tagFORMATETC *PFORMATETC;

EXTERN_C const IID IID_IEnumFORMATETC;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("00000103-0000-0000-C000-000000000046") IEnumFORMATETC : public IUnknown
{
public:
    virtual /* [local] */ CARAPI Next(
            /* [in] */ UInt32 celt,
            /* [length_is][size_is][out] */ FORMATETC *rgelt,
            /* [out] */ UInt32 *pceltFetched) = 0;

    virtual CARAPI Skip(
            /* [in] */ UInt32 celt) = 0;

    virtual CARAPI Reset( void) = 0;

    virtual CARAPI Clone(
            /* [out] */ IEnumFORMATETC **ppenum) = 0;
};

#else

typedef struct IEnumFORMATETCVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IEnumFORMATETC * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IEnumFORMATETC * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IEnumFORMATETC * This);

        /* [local] */ ECode (CARAPICALLTYPE *Next )(
            IEnumFORMATETC * This,
            /* [in] */ UInt32 celt,
            /* [length_is][size_is][out] */ FORMATETC *rgelt,
            /* [out] */ UInt32 *pceltFetched);

        ECode (CARAPICALLTYPE *Skip )(
            IEnumFORMATETC * This,
            /* [in] */ UInt32 celt);

        ECode (CARAPICALLTYPE *Reset )(
            IEnumFORMATETC * This);

        ECode (CARAPICALLTYPE *Clone )(
            IEnumFORMATETC * This,
            /* [out] */ IEnumFORMATETC **ppenum);

    } IEnumFORMATETCVtbl;

interface IEnumFORMATETC
    {
        CONST_VTBL struct IEnumFORMATETCVtbl *v;
    };

#ifdef COBJMACROS

#define IEnumFORMATETC_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IEnumFORMATETC_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IEnumFORMATETC_Release(This)    \
    (This)->v -> Release(This)

#define IEnumFORMATETC_Next(This,celt,rgelt,pceltFetched)    \
    (This)->v -> Next(This,celt,rgelt,pceltFetched)

#define IEnumFORMATETC_Skip(This,celt)    \
    (This)->v -> Skip(This,celt)

#define IEnumFORMATETC_Reset(This)    \
    (This)->v -> Reset(This)

#define IEnumFORMATETC_Clone(This,ppenum)    \
    (This)->v -> Clone(This,ppenum)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IEnumFORMATETC_INTERFACE_DEFINED__ */

#ifndef __IEnumSTATDATA_INTERFACE_DEFINED__
#define __IEnumSTATDATA_INTERFACE_DEFINED__

/* interface IEnumSTATDATA */
/* [unique][uuid][object] */

typedef /* [unique] */ IEnumSTATDATA *PENUMSTATDATA;

typedef struct  tagSTATDATA
    {
    FORMATETC formatetc;
    UInt32 advf;
    /* [unique] */ IAdviseSink *pAdvSink;
    UInt32 dwConnection;
    }    STATDATA;

typedef struct tagSTATDATA *PSTATDATA;

EXTERN_C const IID IID_IEnumSTATDATA;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("00000105-0000-0000-C000-000000000046") IEnumSTATDATA : public IUnknown
{
public:
    virtual /* [local] */ CARAPI Next(
            /* [in] */ UInt32 celt,
            /* [length_is][size_is][out] */ STATDATA *rgelt,
            /* [out] */ UInt32 *pceltFetched) = 0;

    virtual CARAPI Skip(
            /* [in] */ UInt32 celt) = 0;

    virtual CARAPI Reset( void) = 0;

    virtual CARAPI Clone(
            /* [out] */ IEnumSTATDATA **ppenum) = 0;
};

#else

typedef struct IEnumSTATDATAVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IEnumSTATDATA * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IEnumSTATDATA * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IEnumSTATDATA * This);

        /* [local] */ ECode (CARAPICALLTYPE *Next )(
            IEnumSTATDATA * This,
            /* [in] */ UInt32 celt,
            /* [length_is][size_is][out] */ STATDATA *rgelt,
            /* [out] */ UInt32 *pceltFetched);

        ECode (CARAPICALLTYPE *Skip )(
            IEnumSTATDATA * This,
            /* [in] */ UInt32 celt);

        ECode (CARAPICALLTYPE *Reset )(
            IEnumSTATDATA * This);

        ECode (CARAPICALLTYPE *Clone )(
            IEnumSTATDATA * This,
            /* [out] */ IEnumSTATDATA **ppenum);

    } IEnumSTATDATAVtbl;

interface IEnumSTATDATA
    {
        CONST_VTBL struct IEnumSTATDATAVtbl *v;
    };

#ifdef COBJMACROS

#define IEnumSTATDATA_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IEnumSTATDATA_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IEnumSTATDATA_Release(This)    \
    (This)->v -> Release(This)

#define IEnumSTATDATA_Next(This,celt,rgelt,pceltFetched)    \
    (This)->v -> Next(This,celt,rgelt,pceltFetched)

#define IEnumSTATDATA_Skip(This,celt)    \
    (This)->v -> Skip(This,celt)

#define IEnumSTATDATA_Reset(This)    \
    (This)->v -> Reset(This)

#define IEnumSTATDATA_Clone(This,ppenum)    \
    (This)->v -> Clone(This,ppenum)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IEnumSTATDATA_INTERFACE_DEFINED__ */

#ifndef __IRootStorage_INTERFACE_DEFINED__
#define __IRootStorage_INTERFACE_DEFINED__

/* interface IRootStorage */
/* [unique][uuid][object] */

typedef /* [unique] */ IRootStorage *PROOTSTORAGE;

EXTERN_C const IID IID_IRootStorage;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("00000012-0000-0000-C000-000000000046") IRootStorage : public IUnknown
{
public:
    virtual CARAPI SwitchToFile(
            /* [in] */ wchar_t * pszFile) = 0;
};

#else

typedef struct IRootStorageVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IRootStorage * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IRootStorage * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IRootStorage * This);

        ECode (CARAPICALLTYPE *SwitchToFile )(
            IRootStorage * This,
            /* [in] */ wchar_t * pszFile);

    } IRootStorageVtbl;

interface IRootStorage
    {
        CONST_VTBL struct IRootStorageVtbl *v;
    };

#ifdef COBJMACROS

#define IRootStorage_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IRootStorage_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IRootStorage_Release(This)    \
    (This)->v -> Release(This)

#define IRootStorage_SwitchToFile(This,pszFile)    \
    (This)->v -> SwitchToFile(This,pszFile)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IRootStorage_INTERFACE_DEFINED__ */

#ifndef __IAdviseSink_INTERFACE_DEFINED__
#define __IAdviseSink_INTERFACE_DEFINED__

/* interface IAdviseSink */
/* [unique][uuid][object] */

typedef IAdviseSink *PADVISESINK;

typedef /* [v1_enum] */
enum tagTYMED
    {    TYMED_HGLOBAL = 1,
    TYMED_FILE = 2,
    TYMED_ISTREAM = 4,
    TYMED_ISTORAGE = 8,
    TYMED_GDI = 16,
    TYMED_MFPICT = 32,
    TYMED_ENHMF = 64,
    TYMED_NULL = 0
    }    TYMED;

#ifdef NONAMELESSUNION
typedef struct tagSTGMEDIUM {
    UInt32 tymed;
    union {
        HBITMAP hBitmap;
        HMETAFILEPICT hMetaFilePict;
        HENHMETAFILE hEnhMetaFile;
        PVoid hGlobal;
        wchar_t * lpszFileName;
        IStream *pstm;
        IStorage *pstg;
        } u;
    IUnknown *pUnkForRelease;
}uSTGMEDIUM;
#else
typedef struct  tagSTGMEDIUM
    {
    UInt32 tymed;
    /* [switch_is][switch_type] */ union
        {
        /* [case()] */ HBITMAP hBitmap;
        /* [case()] */ HMETAFILEPICT hMetaFilePict;
        /* [case()] */ HENHMETAFILE hEnhMetaFile;
        /* [case()] */ PVoid hGlobal;
        /* [case()] */ wchar_t * lpszFileName;
        /* [case()] */ IStream *pstm;
        /* [case()] */ IStorage *pstg;
        /* [default] */  /* Empty union arm */
        }    ;
    /* [unique] */ IUnknown *pUnkForRelease;
    }    uSTGMEDIUM;

#endif /* !NONAMELESSUNION */
typedef uSTGMEDIUM STGMEDIUM;

typedef STGMEDIUM *PSTGMEDIUM;

EXTERN_C const IID IID_IAdviseSink;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("0000010f-0000-0000-C000-000000000046") IAdviseSink : public IUnknown
{
public:
    virtual /* [local] */ void STDMETHODCALLTYPE OnDataChange(
            /* [unique][in] */ FORMATETC *pFormatetc,
            /* [unique][in] */ STGMEDIUM *pStgmed) = 0;

    virtual /* [local] */ void STDMETHODCALLTYPE OnViewChange(
            /* [in] */ UInt32 dwAspect,
            /* [in] */ Int32 lindex) = 0;

    virtual /* [local] */ void STDMETHODCALLTYPE OnRename(
            /* [in] */ IMoniker *pmk) = 0;

    virtual /* [local] */ void STDMETHODCALLTYPE OnSave( void) = 0;

    virtual /* [local] */ void STDMETHODCALLTYPE OnClose( void) = 0;
};

#else

typedef struct IAdviseSinkVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IAdviseSink * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IAdviseSink * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IAdviseSink * This);

        /* [local] */ void ( STDMETHODCALLTYPE *OnDataChange )(
            IAdviseSink * This,
            /* [unique][in] */ FORMATETC *pFormatetc,
            /* [unique][in] */ STGMEDIUM *pStgmed);

        /* [local] */ void ( STDMETHODCALLTYPE *OnViewChange )(
            IAdviseSink * This,
            /* [in] */ UInt32 dwAspect,
            /* [in] */ Int32 lindex);

        /* [local] */ void ( STDMETHODCALLTYPE *OnRename )(
            IAdviseSink * This,
            /* [in] */ IMoniker *pmk);

        /* [local] */ void ( STDMETHODCALLTYPE *OnSave )(
            IAdviseSink * This);

        /* [local] */ void ( STDMETHODCALLTYPE *OnClose )(
            IAdviseSink * This);

    } IAdviseSinkVtbl;

interface IAdviseSink
    {
        CONST_VTBL struct IAdviseSinkVtbl *v;
    };

#ifdef COBJMACROS

#define IAdviseSink_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IAdviseSink_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IAdviseSink_Release(This)    \
    (This)->v -> Release(This)

#define IAdviseSink_OnDataChange(This,pFormatetc,pStgmed)    \
    (This)->v -> OnDataChange(This,pFormatetc,pStgmed)

#define IAdviseSink_OnViewChange(This,dwAspect,lindex)    \
    (This)->v -> OnViewChange(This,dwAspect,lindex)

#define IAdviseSink_OnRename(This,pmk)    \
    (This)->v -> OnRename(This,pmk)

#define IAdviseSink_OnSave(This)    \
    (This)->v -> OnSave(This)

#define IAdviseSink_OnClose(This)    \
    (This)->v -> OnClose(This)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IAdviseSink_INTERFACE_DEFINED__ */

#ifndef __IDataObject_INTERFACE_DEFINED__
#define __IDataObject_INTERFACE_DEFINED__

/* interface IDataObject */
/* [unique][uuid][object] */

typedef /* [unique] */ IDataObject *PDATAOBJECT;

EXTERN_C const IID IID_IDataObject;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("0000010e-0000-0000-C000-000000000046") IDataObject : public IUnknown
{
public:
    virtual /* [local] */ CARAPI GetData(
            /* [unique][in] */ FORMATETC *pformatetcIn,
            /* [out] */ STGMEDIUM *pmedium) = 0;

    virtual /* [local] */ CARAPI GetDataHere(
            /* [unique][in] */ FORMATETC *pformatetc,
            /* [out][in] */ STGMEDIUM *pmedium) = 0;

    virtual CARAPI QueryGetData(
            /* [unique][in] */ FORMATETC *pformatetc) = 0;

    virtual CARAPI GetCanonicalFormatEtc(
            /* [unique][in] */ FORMATETC *pformatectIn,
            /* [out] */ FORMATETC *pformatetcOut) = 0;

    virtual /* [local] */ CARAPI SetData(
            /* [unique][in] */ FORMATETC *pformatetc,
            /* [unique][in] */ STGMEDIUM *pmedium,
            /* [in] */ _ELASTOS Boolean fRelease) = 0;

    virtual CARAPI EnumFormatEtc(
            /* [in] */ UInt32 dwDirection,
            /* [out] */ IEnumFORMATETC **ppenumFormatEtc) = 0;

    virtual CARAPI DAdvise(
            /* [in] */ FORMATETC *pformatetc,
            /* [in] */ UInt32 advf,
            /* [unique][in] */ IAdviseSink *pAdvSink,
            /* [out] */ UInt32 *pdwConnection) = 0;

    virtual CARAPI DUnadvise(
            /* [in] */ UInt32 dwConnection) = 0;

    virtual CARAPI EnumDAdvise(
            /* [out] */ IEnumSTATDATA **ppenumAdvise) = 0;
};

#else

typedef struct IDataObjectVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IDataObject * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IDataObject * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IDataObject * This);

        /* [local] */ ECode (CARAPICALLTYPE *GetData )(
            IDataObject * This,
            /* [unique][in] */ FORMATETC *pformatetcIn,
            /* [out] */ STGMEDIUM *pmedium);

        /* [local] */ ECode (CARAPICALLTYPE *GetDataHere )(
            IDataObject * This,
            /* [unique][in] */ FORMATETC *pformatetc,
            /* [out][in] */ STGMEDIUM *pmedium);

        ECode (CARAPICALLTYPE *QueryGetData )(
            IDataObject * This,
            /* [unique][in] */ FORMATETC *pformatetc);

        ECode (CARAPICALLTYPE *GetCanonicalFormatEtc )(
            IDataObject * This,
            /* [unique][in] */ FORMATETC *pformatectIn,
            /* [out] */ FORMATETC *pformatetcOut);

        /* [local] */ ECode (CARAPICALLTYPE *SetData )(
            IDataObject * This,
            /* [unique][in] */ FORMATETC *pformatetc,
            /* [unique][in] */ STGMEDIUM *pmedium,
            /* [in] */ _ELASTOS Boolean fRelease);

        ECode (CARAPICALLTYPE *EnumFormatEtc )(
            IDataObject * This,
            /* [in] */ UInt32 dwDirection,
            /* [out] */ IEnumFORMATETC **ppenumFormatEtc);

        ECode (CARAPICALLTYPE *DAdvise )(
            IDataObject * This,
            /* [in] */ FORMATETC *pformatetc,
            /* [in] */ UInt32 advf,
            /* [unique][in] */ IAdviseSink *pAdvSink,
            /* [out] */ UInt32 *pdwConnection);

        ECode (CARAPICALLTYPE *DUnadvise )(
            IDataObject * This,
            /* [in] */ UInt32 dwConnection);

        ECode (CARAPICALLTYPE *EnumDAdvise )(
            IDataObject * This,
            /* [out] */ IEnumSTATDATA **ppenumAdvise);

    } IDataObjectVtbl;

interface IDataObject
    {
        CONST_VTBL struct IDataObjectVtbl *v;
    };

#ifdef COBJMACROS

#define IDataObject_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IDataObject_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IDataObject_Release(This)    \
    (This)->v -> Release(This)

#define IDataObject_GetData(This,pformatetcIn,pmedium)    \
    (This)->v -> GetData(This,pformatetcIn,pmedium)

#define IDataObject_GetDataHere(This,pformatetc,pmedium)    \
    (This)->v -> GetDataHere(This,pformatetc,pmedium)

#define IDataObject_QueryGetData(This,pformatetc)    \
    (This)->v -> QueryGetData(This,pformatetc)

#define IDataObject_GetCanonicalFormatEtc(This,pformatectIn,pformatetcOut)    \
    (This)->v -> GetCanonicalFormatEtc(This,pformatectIn,pformatetcOut)

#define IDataObject_SetData(This,pformatetc,pmedium,fRelease)    \
    (This)->v -> SetData(This,pformatetc,pmedium,fRelease)

#define IDataObject_EnumFormatEtc(This,dwDirection,ppenumFormatEtc)    \
    (This)->v -> EnumFormatEtc(This,dwDirection,ppenumFormatEtc)

#define IDataObject_DAdvise(This,pformatetc,advf,pAdvSink,pdwConnection)    \
    (This)->v -> DAdvise(This,pformatetc,advf,pAdvSink,pdwConnection)

#define IDataObject_DUnadvise(This,dwConnection)    \
    (This)->v -> DUnadvise(This,dwConnection)

#define IDataObject_EnumDAdvise(This,ppenumAdvise)    \
    (This)->v -> EnumDAdvise(This,ppenumAdvise)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IDataObject_INTERFACE_DEFINED__ */

#ifndef __IDataAdviseHolder_INTERFACE_DEFINED__
#define __IDataAdviseHolder_INTERFACE_DEFINED__

/* interface IDataAdviseHolder */
/* [uuid][object][local] */

typedef /* [unique] */ IDataAdviseHolder *PDATAADVISEHOLDER;

EXTERN_C const IID IID_IDataAdviseHolder;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("00000110-0000-0000-C000-000000000046") IDataAdviseHolder : public IUnknown
{
public:
    virtual CARAPI Advise(
            /* [unique][in] */ IDataObject *pDataObject,
            /* [unique][in] */ FORMATETC *pFetc,
            /* [in] */ UInt32 advf,
            /* [unique][in] */ IAdviseSink *pAdvise,
            /* [out] */ UInt32 *pdwConnection) = 0;

    virtual CARAPI Unadvise(
            /* [in] */ UInt32 dwConnection) = 0;

    virtual CARAPI EnumAdvise(
            /* [out] */ IEnumSTATDATA **ppenumAdvise) = 0;

    virtual CARAPI SendOnDataChange(
            /* [unique][in] */ IDataObject *pDataObject,
            /* [in] */ UInt32 dwReserved,
            /* [in] */ UInt32 advf) = 0;
};

#else

typedef struct IDataAdviseHolderVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IDataAdviseHolder * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IDataAdviseHolder * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IDataAdviseHolder * This);

        ECode (CARAPICALLTYPE *Advise )(
            IDataAdviseHolder * This,
            /* [unique][in] */ IDataObject *pDataObject,
            /* [unique][in] */ FORMATETC *pFetc,
            /* [in] */ UInt32 advf,
            /* [unique][in] */ IAdviseSink *pAdvise,
            /* [out] */ UInt32 *pdwConnection);

        ECode (CARAPICALLTYPE *Unadvise )(
            IDataAdviseHolder * This,
            /* [in] */ UInt32 dwConnection);

        ECode (CARAPICALLTYPE *EnumAdvise )(
            IDataAdviseHolder * This,
            /* [out] */ IEnumSTATDATA **ppenumAdvise);

        ECode (CARAPICALLTYPE *SendOnDataChange )(
            IDataAdviseHolder * This,
            /* [unique][in] */ IDataObject *pDataObject,
            /* [in] */ UInt32 dwReserved,
            /* [in] */ UInt32 advf);

    } IDataAdviseHolderVtbl;

interface IDataAdviseHolder
    {
        CONST_VTBL struct IDataAdviseHolderVtbl *v;
    };

#ifdef COBJMACROS

#define IDataAdviseHolder_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IDataAdviseHolder_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IDataAdviseHolder_Release(This)    \
    (This)->v -> Release(This)

#define IDataAdviseHolder_Advise(This,pDataObject,pFetc,advf,pAdvise,pdwConnection)    \
    (This)->v -> Advise(This,pDataObject,pFetc,advf,pAdvise,pdwConnection)

#define IDataAdviseHolder_Unadvise(This,dwConnection)    \
    (This)->v -> Unadvise(This,dwConnection)

#define IDataAdviseHolder_EnumAdvise(This,ppenumAdvise)    \
    (This)->v -> EnumAdvise(This,ppenumAdvise)

#define IDataAdviseHolder_SendOnDataChange(This,pDataObject,dwReserved,advf)    \
    (This)->v -> SendOnDataChange(This,pDataObject,dwReserved,advf)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IDataAdviseHolder_INTERFACE_DEFINED__ */

#ifndef __IAsyncManager_INTERFACE_DEFINED__
#define __IAsyncManager_INTERFACE_DEFINED__

/* interface IAsyncManager */
/* [uuid][object][local] */

EXTERN_C const IID IID_IAsyncManager;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("0000002A-0000-0000-C000-000000000046") IAsyncManager : public IUnknown
{
public:
    virtual CARAPI CompleteCall(
            /* [in] */ ECode Result) = 0;

    virtual CARAPI GetCallContext(
            /* [in] */ RIID riid,
            /* [out] */ void **pInterface) = 0;

    virtual CARAPI GetState(
            /* [out] */ UInt32 *pulStateFlags) = 0;
};

#else

typedef struct IAsyncManagerVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IAsyncManager * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IAsyncManager * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IAsyncManager * This);

        ECode (CARAPICALLTYPE *CompleteCall )(
            IAsyncManager * This,
            /* [in] */ ECode Result);

        ECode (CARAPICALLTYPE *GetCallContext )(
            IAsyncManager * This,
            /* [in] */ RIID riid,
            /* [out] */ void **pInterface);

        ECode (CARAPICALLTYPE *GetState )(
            IAsyncManager * This,
            /* [out] */ UInt32 *pulStateFlags);

    } IAsyncManagerVtbl;

interface IAsyncManager
    {
        CONST_VTBL struct IAsyncManagerVtbl *v;
    };

#ifdef COBJMACROS

#define IAsyncManager_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IAsyncManager_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IAsyncManager_Release(This)    \
    (This)->v -> Release(This)

#define IAsyncManager_CompleteCall(This,Result)    \
    (This)->v -> CompleteCall(This,Result)

#define IAsyncManager_GetCallContext(This,riid,pInterface)    \
    (This)->v -> GetCallContext(This,riid,pInterface)

#define IAsyncManager_GetState(This,pulStateFlags)    \
    (This)->v -> GetState(This,pulStateFlags)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IAsyncManager_INTERFACE_DEFINED__ */

#ifndef __IRpcChannelBuffer_INTERFACE_DEFINED__
#define __IRpcChannelBuffer_INTERFACE_DEFINED__

/* interface IRpcChannelBuffer */
/* [uuid][object][local] */

typedef unsigned long RPCOLEDATAREP;

typedef struct  tagRPCOLEMESSAGE
    {
    void *reserved1;
    RPCOLEDATAREP dataRepresentation;
    void *Buffer;
    UInt32 cbBuffer;
    UInt32 iMethod;
    void *reserved2[ 5 ];
    UInt32 rpcFlags;
    }    RPCOLEMESSAGE;

typedef RPCOLEMESSAGE *PRPCOLEMESSAGE;

EXTERN_C const IID IID_IRpcChannelBuffer;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("D5F56B60-593B-101A-B569-08002B2DBF7A") IRpcChannelBuffer : public IUnknown
{
public:
    virtual CARAPI GetBuffer(
            /* [in] */ RPCOLEMESSAGE *pMessage,
            /* [in] */ RIID riid) = 0;

    virtual CARAPI SendReceive(
            /* [out][in] */ RPCOLEMESSAGE *pMessage,
            /* [out] */ UInt32 *pStatus) = 0;

    virtual CARAPI FreeBuffer(
            /* [in] */ RPCOLEMESSAGE *pMessage) = 0;

    virtual CARAPI GetDestCtx(
            /* [out] */ UInt32 *pdwDestContext,
            /* [out] */ void **ppvDestContext) = 0;

    virtual CARAPI IsConnected( void) = 0;
};

#else

typedef struct IRpcChannelBufferVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IRpcChannelBuffer * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IRpcChannelBuffer * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IRpcChannelBuffer * This);

        ECode (CARAPICALLTYPE *GetBuffer )(
            IRpcChannelBuffer * This,
            /* [in] */ RPCOLEMESSAGE *pMessage,
            /* [in] */ RIID riid);

        ECode (CARAPICALLTYPE *SendReceive )(
            IRpcChannelBuffer * This,
            /* [out][in] */ RPCOLEMESSAGE *pMessage,
            /* [out] */ UInt32 *pStatus);

        ECode (CARAPICALLTYPE *FreeBuffer )(
            IRpcChannelBuffer * This,
            /* [in] */ RPCOLEMESSAGE *pMessage);

        ECode (CARAPICALLTYPE *GetDestCtx )(
            IRpcChannelBuffer * This,
            /* [out] */ UInt32 *pdwDestContext,
            /* [out] */ void **ppvDestContext);

        ECode (CARAPICALLTYPE *IsConnected )(
            IRpcChannelBuffer * This);

    } IRpcChannelBufferVtbl;

interface IRpcChannelBuffer
    {
        CONST_VTBL struct IRpcChannelBufferVtbl *v;
    };

#ifdef COBJMACROS

#define IRpcChannelBuffer_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IRpcChannelBuffer_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IRpcChannelBuffer_Release(This)    \
    (This)->v -> Release(This)

#define IRpcChannelBuffer_GetBuffer(This,pMessage,riid)    \
    (This)->v -> GetBuffer(This,pMessage,riid)

#define IRpcChannelBuffer_SendReceive(This,pMessage,pStatus)    \
    (This)->v -> SendReceive(This,pMessage,pStatus)

#define IRpcChannelBuffer_FreeBuffer(This,pMessage)    \
    (This)->v -> FreeBuffer(This,pMessage)

#define IRpcChannelBuffer_GetDestCtx(This,pdwDestContext,ppvDestContext)    \
    (This)->v -> GetDestCtx(This,pdwDestContext,ppvDestContext)

#define IRpcChannelBuffer_IsConnected(This)    \
    (This)->v -> IsConnected(This)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IRpcChannelBuffer_INTERFACE_DEFINED__ */

#ifndef __IRpcChannelBuffer2_INTERFACE_DEFINED__
#define __IRpcChannelBuffer2_INTERFACE_DEFINED__

/* interface IRpcChannelBuffer2 */
/* [uuid][object][local] */

EXTERN_C const IID IID_IRpcChannelBuffer2;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("594f31d0-7f19-11d0-b194-00a0c90dc8bf") IRpcChannelBuffer2 : public IRpcChannelBuffer
{
public:
    virtual CARAPI GetProtocolVersion(
            /* [out][in] */ UInt32 *pdwVersion) = 0;
};

#else

typedef struct IRpcChannelBuffer2Vtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IRpcChannelBuffer2 * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IRpcChannelBuffer2 * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IRpcChannelBuffer2 * This);

        ECode (CARAPICALLTYPE *GetBuffer )(
            IRpcChannelBuffer2 * This,
            /* [in] */ RPCOLEMESSAGE *pMessage,
            /* [in] */ RIID riid);

        ECode (CARAPICALLTYPE *SendReceive )(
            IRpcChannelBuffer2 * This,
            /* [out][in] */ RPCOLEMESSAGE *pMessage,
            /* [out] */ UInt32 *pStatus);

        ECode (CARAPICALLTYPE *FreeBuffer )(
            IRpcChannelBuffer2 * This,
            /* [in] */ RPCOLEMESSAGE *pMessage);

        ECode (CARAPICALLTYPE *GetDestCtx )(
            IRpcChannelBuffer2 * This,
            /* [out] */ UInt32 *pdwDestContext,
            /* [out] */ void **ppvDestContext);

        ECode (CARAPICALLTYPE *IsConnected )(
            IRpcChannelBuffer2 * This);

        ECode (CARAPICALLTYPE *GetProtocolVersion )(
            IRpcChannelBuffer2 * This,
            /* [out][in] */ UInt32 *pdwVersion);

    } IRpcChannelBuffer2Vtbl;

interface IRpcChannelBuffer2
    {
        CONST_VTBL struct IRpcChannelBuffer2Vtbl *v;
    };

#ifdef COBJMACROS

#define IRpcChannelBuffer2_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IRpcChannelBuffer2_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IRpcChannelBuffer2_Release(This)    \
    (This)->v -> Release(This)

#define IRpcChannelBuffer2_GetBuffer(This,pMessage,riid)    \
    (This)->v -> GetBuffer(This,pMessage,riid)

#define IRpcChannelBuffer2_SendReceive(This,pMessage,pStatus)    \
    (This)->v -> SendReceive(This,pMessage,pStatus)

#define IRpcChannelBuffer2_FreeBuffer(This,pMessage)    \
    (This)->v -> FreeBuffer(This,pMessage)

#define IRpcChannelBuffer2_GetDestCtx(This,pdwDestContext,ppvDestContext)    \
    (This)->v -> GetDestCtx(This,pdwDestContext,ppvDestContext)

#define IRpcChannelBuffer2_IsConnected(This)    \
    (This)->v -> IsConnected(This)

#define IRpcChannelBuffer2_GetProtocolVersion(This,pdwVersion)    \
    (This)->v -> GetProtocolVersion(This,pdwVersion)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IRpcChannelBuffer2_INTERFACE_DEFINED__ */

#ifndef __IRpcChannelBuffer3_INTERFACE_DEFINED__
#define __IRpcChannelBuffer3_INTERFACE_DEFINED__

/* interface IRpcChannelBuffer3 */
/* [uuid][object][local] */

EXTERN_C const IID IID_IRpcChannelBuffer3;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("25B15600-0115-11d0-BF0D-00AA00B8DFD2") IRpcChannelBuffer3 : public IRpcChannelBuffer2
{
public:
    virtual CARAPI Send(
            /* [out][in] */ RPCOLEMESSAGE *pMsg,
            /* [out] */ UInt32 *pulStatus) = 0;

    virtual CARAPI Receive(
            /* [out][in] */ RPCOLEMESSAGE *pMsg,
            /* [in] */ UInt32 ulSize,
            /* [out] */ UInt32 *pulStatus) = 0;

    virtual CARAPI Cancel(
            /* [in] */ RPCOLEMESSAGE *pMsg) = 0;

    virtual CARAPI GetCallContext(
            /* [in] */ RPCOLEMESSAGE *pMsg,
            /* [in] */ RIID riid,
            /* [out] */ void **pInterface) = 0;

    virtual CARAPI GetDestCtxEx(
            /* [in] */ RPCOLEMESSAGE *pMsg,
            /* [out] */ UInt32 *pdwDestContext,
            /* [out] */ void **ppvDestContext) = 0;

    virtual CARAPI GetState(
            /* [in] */ RPCOLEMESSAGE *pMsg,
            /* [out] */ UInt32 *pState) = 0;

    virtual CARAPI RegisterAsync(
            /* [in] */ RPCOLEMESSAGE *pMsg,
            /* [in] */ IAsyncManager *pAsyncMgr) = 0;
};

#else

typedef struct IRpcChannelBuffer3Vtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IRpcChannelBuffer3 * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IRpcChannelBuffer3 * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IRpcChannelBuffer3 * This);

        ECode (CARAPICALLTYPE *GetBuffer )(
            IRpcChannelBuffer3 * This,
            /* [in] */ RPCOLEMESSAGE *pMessage,
            /* [in] */ RIID riid);

        ECode (CARAPICALLTYPE *SendReceive )(
            IRpcChannelBuffer3 * This,
            /* [out][in] */ RPCOLEMESSAGE *pMessage,
            /* [out] */ UInt32 *pStatus);

        ECode (CARAPICALLTYPE *FreeBuffer )(
            IRpcChannelBuffer3 * This,
            /* [in] */ RPCOLEMESSAGE *pMessage);

        ECode (CARAPICALLTYPE *GetDestCtx )(
            IRpcChannelBuffer3 * This,
            /* [out] */ UInt32 *pdwDestContext,
            /* [out] */ void **ppvDestContext);

        ECode (CARAPICALLTYPE *IsConnected )(
            IRpcChannelBuffer3 * This);

        ECode (CARAPICALLTYPE *GetProtocolVersion )(
            IRpcChannelBuffer3 * This,
            /* [out][in] */ UInt32 *pdwVersion);

        ECode (CARAPICALLTYPE *Send )(
            IRpcChannelBuffer3 * This,
            /* [out][in] */ RPCOLEMESSAGE *pMsg,
            /* [out] */ UInt32 *pulStatus);

        ECode (CARAPICALLTYPE *Receive )(
            IRpcChannelBuffer3 * This,
            /* [out][in] */ RPCOLEMESSAGE *pMsg,
            /* [in] */ UInt32 ulSize,
            /* [out] */ UInt32 *pulStatus);

        ECode (CARAPICALLTYPE *Cancel )(
            IRpcChannelBuffer3 * This,
            /* [in] */ RPCOLEMESSAGE *pMsg);

        ECode (CARAPICALLTYPE *GetCallContext )(
            IRpcChannelBuffer3 * This,
            /* [in] */ RPCOLEMESSAGE *pMsg,
            /* [in] */ RIID riid,
            /* [out] */ void **pInterface);

        ECode (CARAPICALLTYPE *GetDestCtxEx )(
            IRpcChannelBuffer3 * This,
            /* [in] */ RPCOLEMESSAGE *pMsg,
            /* [out] */ UInt32 *pdwDestContext,
            /* [out] */ void **ppvDestContext);

        ECode (CARAPICALLTYPE *GetState )(
            IRpcChannelBuffer3 * This,
            /* [in] */ RPCOLEMESSAGE *pMsg,
            /* [out] */ UInt32 *pState);

        ECode (CARAPICALLTYPE *RegisterAsync )(
            IRpcChannelBuffer3 * This,
            /* [in] */ RPCOLEMESSAGE *pMsg,
            /* [in] */ IAsyncManager *pAsyncMgr);

    } IRpcChannelBuffer3Vtbl;

interface IRpcChannelBuffer3
    {
        CONST_VTBL struct IRpcChannelBuffer3Vtbl *v;
    };

#ifdef COBJMACROS

#define IRpcChannelBuffer3_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IRpcChannelBuffer3_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IRpcChannelBuffer3_Release(This)    \
    (This)->v -> Release(This)

#define IRpcChannelBuffer3_GetBuffer(This,pMessage,riid)    \
    (This)->v -> GetBuffer(This,pMessage,riid)

#define IRpcChannelBuffer3_SendReceive(This,pMessage,pStatus)    \
    (This)->v -> SendReceive(This,pMessage,pStatus)

#define IRpcChannelBuffer3_FreeBuffer(This,pMessage)    \
    (This)->v -> FreeBuffer(This,pMessage)

#define IRpcChannelBuffer3_GetDestCtx(This,pdwDestContext,ppvDestContext)    \
    (This)->v -> GetDestCtx(This,pdwDestContext,ppvDestContext)

#define IRpcChannelBuffer3_IsConnected(This)    \
    (This)->v -> IsConnected(This)

#define IRpcChannelBuffer3_GetProtocolVersion(This,pdwVersion)    \
    (This)->v -> GetProtocolVersion(This,pdwVersion)

#define IRpcChannelBuffer3_Send(This,pMsg,pulStatus)    \
    (This)->v -> Send(This,pMsg,pulStatus)

#define IRpcChannelBuffer3_Receive(This,pMsg,ulSize,pulStatus)    \
    (This)->v -> Receive(This,pMsg,ulSize,pulStatus)

#define IRpcChannelBuffer3_Cancel(This,pMsg)    \
    (This)->v -> Cancel(This,pMsg)

#define IRpcChannelBuffer3_GetCallContext(This,pMsg,riid,pInterface)    \
    (This)->v -> GetCallContext(This,pMsg,riid,pInterface)

#define IRpcChannelBuffer3_GetDestCtxEx(This,pMsg,pdwDestContext,ppvDestContext)    \
    (This)->v -> GetDestCtxEx(This,pMsg,pdwDestContext,ppvDestContext)

#define IRpcChannelBuffer3_GetState(This,pMsg,pState)    \
    (This)->v -> GetState(This,pMsg,pState)

#define IRpcChannelBuffer3_RegisterAsync(This,pMsg,pAsyncMgr)    \
    (This)->v -> RegisterAsync(This,pMsg,pAsyncMgr)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IRpcChannelBuffer3_INTERFACE_DEFINED__ */

#ifndef __IRpcProxyBuffer_INTERFACE_DEFINED__
#define __IRpcProxyBuffer_INTERFACE_DEFINED__

/* interface IRpcProxyBuffer */
/* [uuid][object][local] */

EXTERN_C const IID IID_IRpcProxyBuffer;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("D5F56A34-593B-101A-B569-08002B2DBF7A") IRpcProxyBuffer : public IUnknown
{
public:
    virtual CARAPI Connect(
            /* [unique][in] */ IRpcChannelBuffer *pRpcChannelBuffer) = 0;

    virtual void STDMETHODCALLTYPE Disconnect( void) = 0;
};

#else

typedef struct IRpcProxyBufferVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IRpcProxyBuffer * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IRpcProxyBuffer * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IRpcProxyBuffer * This);

        ECode (CARAPICALLTYPE *Connect )(
            IRpcProxyBuffer * This,
            /* [unique][in] */ IRpcChannelBuffer *pRpcChannelBuffer);

        void ( STDMETHODCALLTYPE *Disconnect )(
            IRpcProxyBuffer * This);

    } IRpcProxyBufferVtbl;

interface IRpcProxyBuffer
    {
        CONST_VTBL struct IRpcProxyBufferVtbl *v;
    };

#ifdef COBJMACROS

#define IRpcProxyBuffer_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IRpcProxyBuffer_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IRpcProxyBuffer_Release(This)    \
    (This)->v -> Release(This)

#define IRpcProxyBuffer_Connect(This,pRpcChannelBuffer)    \
    (This)->v -> Connect(This,pRpcChannelBuffer)

#define IRpcProxyBuffer_Disconnect(This)    \
    (This)->v -> Disconnect(This)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IRpcProxyBuffer_INTERFACE_DEFINED__ */

#ifndef __IRpcStubBuffer_INTERFACE_DEFINED__
#define __IRpcStubBuffer_INTERFACE_DEFINED__

/* interface IRpcStubBuffer */
/* [uuid][object][local] */

EXTERN_C const IID IID_IRpcStubBuffer;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("D5F56AFC-593B-101A-B569-08002B2DBF7A") IRpcStubBuffer : public IUnknown
{
public:
    virtual CARAPI Connect(
            /* [in] */ IUnknown *pUnkServer) = 0;

    virtual void STDMETHODCALLTYPE Disconnect( void) = 0;

    virtual CARAPI Invoke(
            /* [in] */ RPCOLEMESSAGE *_prpcmsg,
            /* [in] */ IRpcChannelBuffer *_pRpcChannelBuffer) = 0;

    virtual IRpcStubBuffer *STDMETHODCALLTYPE IsIIDSupported(
            /* [in] */ RIID riid) = 0;

    virtual UInt32 STDMETHODCALLTYPE CountRefs( void) = 0;

    virtual CARAPI DebugServerQueryInterface(
            void **ppv) = 0;

    virtual void STDMETHODCALLTYPE DebugServerRelease(
            void *pv) = 0;
};

#else

typedef struct IRpcStubBufferVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IRpcStubBuffer * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IRpcStubBuffer * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IRpcStubBuffer * This);

        ECode (CARAPICALLTYPE *Connect )(
            IRpcStubBuffer * This,
            /* [in] */ IUnknown *pUnkServer);

        void ( STDMETHODCALLTYPE *Disconnect )(
            IRpcStubBuffer * This);

        ECode (CARAPICALLTYPE *Invoke )(
            IRpcStubBuffer * This,
            /* [in] */ RPCOLEMESSAGE *_prpcmsg,
            /* [in] */ IRpcChannelBuffer *_pRpcChannelBuffer);

        IRpcStubBuffer *( STDMETHODCALLTYPE *IsIIDSupported )(
            IRpcStubBuffer * This,
            /* [in] */ RIID riid);

        UInt32 (CARAPICALLTYPE *CountRefs )(
            IRpcStubBuffer * This);

        ECode (CARAPICALLTYPE *DebugServerQueryInterface )(
            IRpcStubBuffer * This,
            void **ppv);

        void ( STDMETHODCALLTYPE *DebugServerRelease )(
            IRpcStubBuffer * This,
            void *pv);

    } IRpcStubBufferVtbl;

interface IRpcStubBuffer
    {
        CONST_VTBL struct IRpcStubBufferVtbl *v;
    };

#ifdef COBJMACROS

#define IRpcStubBuffer_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IRpcStubBuffer_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IRpcStubBuffer_Release(This)    \
    (This)->v -> Release(This)

#define IRpcStubBuffer_Connect(This,pUnkServer)    \
    (This)->v -> Connect(This,pUnkServer)

#define IRpcStubBuffer_Disconnect(This)    \
    (This)->v -> Disconnect(This)

#define IRpcStubBuffer_Invoke(This,_prpcmsg,_pRpcChannelBuffer)    \
    (This)->v -> Invoke(This,_prpcmsg,_pRpcChannelBuffer)

#define IRpcStubBuffer_IsIIDSupported(This,riid)    \
    (This)->v -> IsIIDSupported(This,riid)

#define IRpcStubBuffer_CountRefs(This)    \
    (This)->v -> CountRefs(This)

#define IRpcStubBuffer_DebugServerQueryInterface(This,ppv)    \
    (This)->v -> DebugServerQueryInterface(This,ppv)

#define IRpcStubBuffer_DebugServerRelease(This,pv)    \
    (This)->v -> DebugServerRelease(This,pv)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IRpcStubBuffer_INTERFACE_DEFINED__ */

#ifndef __IPSFactoryBuffer_INTERFACE_DEFINED__
#define __IPSFactoryBuffer_INTERFACE_DEFINED__

/* interface IPSFactoryBuffer */
/* [uuid][object][local] */

EXTERN_C const IID IID_IPSFactoryBuffer;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("D5F569D0-593B-101A-B569-08002B2DBF7A") IPSFactoryBuffer : public IUnknown
{
public:
    virtual CARAPI CreateProxy(
            /* [in] */ IUnknown *pUnkOuter,
            /* [in] */ RIID riid,
            /* [out] */ IRpcProxyBuffer **ppProxy,
            /* [out] */ void **ppv) = 0;

    virtual CARAPI CreateStub(
            /* [in] */ RIID riid,
            /* [unique][in] */ IUnknown *pUnkServer,
            /* [out] */ IRpcStubBuffer **ppStub) = 0;
};

#else

typedef struct IPSFactoryBufferVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IPSFactoryBuffer * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IPSFactoryBuffer * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IPSFactoryBuffer * This);

        ECode (CARAPICALLTYPE *CreateProxy )(
            IPSFactoryBuffer * This,
            /* [in] */ IUnknown *pUnkOuter,
            /* [in] */ RIID riid,
            /* [out] */ IRpcProxyBuffer **ppProxy,
            /* [out] */ void **ppv);

        ECode (CARAPICALLTYPE *CreateStub )(
            IPSFactoryBuffer * This,
            /* [in] */ RIID riid,
            /* [unique][in] */ IUnknown *pUnkServer,
            /* [out] */ IRpcStubBuffer **ppStub);

    } IPSFactoryBufferVtbl;

interface IPSFactoryBuffer
    {
        CONST_VTBL struct IPSFactoryBufferVtbl *v;
    };

#ifdef COBJMACROS

#define IPSFactoryBuffer_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IPSFactoryBuffer_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IPSFactoryBuffer_Release(This)    \
    (This)->v -> Release(This)

#define IPSFactoryBuffer_CreateProxy(This,pUnkOuter,riid,ppProxy,ppv)    \
    (This)->v -> CreateProxy(This,pUnkOuter,riid,ppProxy,ppv)

#define IPSFactoryBuffer_CreateStub(This,riid,pUnkServer,ppStub)    \
    (This)->v -> CreateStub(This,riid,pUnkServer,ppStub)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IPSFactoryBuffer_INTERFACE_DEFINED__ */

/* Additional Prototypes for ALL interfaces */

/* end of Additional Prototypes */

#ifdef __cplusplus
}
#endif

#endif
